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

@harmony-js/crypto

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmony-js/crypto - npm Package Compare versions

Comparing version 0.1.28 to 0.1.32

test/address.test.ts

15

dist/index.cjs.js

@@ -603,9 +603,9 @@ /**

}
function sha3_256(data) {
var arrayified = arrayify(data);
if (arrayified) {
return '0x' + sha3.sha3_256(arrayified);
}
throw new Error('arrayify failed');
}
// export function sha3_256(data: Arrayish): string {
// const arrayified = arrayify(data);
// if (arrayified) {
// return '0x' + sha3.sha3_256(arrayified);
// }
// throw new Error('arrayify failed');
// }

@@ -1429,3 +1429,2 @@ // this file is ported from https://github.com/ethers-io/ethers.js/blob/master/src.ts/utils/rlp.ts

exports.keccak256 = keccak256;
exports.sha3_256 = sha3_256;
exports.UNKNOWN_ERROR = UNKNOWN_ERROR;

@@ -1432,0 +1431,0 @@ exports.NOT_IMPLEMENTED = NOT_IMPLEMENTED;

@@ -5,3 +5,3 @@ /**

import { keccak_256, sha3_256 } from 'js-sha3';
import { keccak_256 } from 'js-sha3';
import elliptic from 'elliptic';

@@ -601,9 +601,9 @@ import { isPrivateKey, strip0x, isAddress, isBech32Address, isBech32TestNetAddress } from '@harmony-js/utils';

}
function sha3_256$1(data) {
var arrayified = arrayify(data);
if (arrayified) {
return '0x' + sha3_256(arrayified);
}
throw new Error('arrayify failed');
}
// export function sha3_256(data: Arrayish): string {
// const arrayified = arrayify(data);
// if (arrayified) {
// return '0x' + sha3.sha3_256(arrayified);
// }
// throw new Error('arrayify failed');
// }

@@ -1383,3 +1383,3 @@ // this file is ported from https://github.com/ethers-io/ethers.js/blob/master/src.ts/utils/rlp.ts

export { randomBytes, generatePrivateKey, getPubkeyFromPrivateKey, getAddressFromPrivateKey, getPublic, getAddressFromPublicKey, toChecksumAddress, sign, getContractAddress, verifySignature, recoverPublicKey, recoverAddress, isValidChecksumAddress, validatePrivateKey, encrypt, decrypt, encryptPhrase, decryptPhrase, isHexable, isArrayish, arrayify, concat, stripZeros, padZeros, isHexString, hexlify, hexDataLength, hexDataSlice, hexStripZeros, hexZeroPad, bytesPadLeft, bytesPadRight, isSignature, splitSignature, joinSignature, hexToByteArray, hexToIntArray, isHex, encode, decode, keccak256, sha3_256$1 as sha3_256, UNKNOWN_ERROR, NOT_IMPLEMENTED, MISSING_NEW, CALL_EXCEPTION, INVALID_ARGUMENT, MISSING_ARGUMENT, UNEXPECTED_ARGUMENT, NUMERIC_FAULT, INSUFFICIENT_FUNDS, NONCE_EXPIRED, REPLACEMENT_UNDERPRICED, UNSUPPORTED_OPERATION, throwError, checkNew, checkArgumentCount, setCensorship, checkNormalize, setLogLevel, warn, info, bech32Encode, bech32Decode, HRP, tHRP, convertBits, toBech32, fromBech32, HarmonyAddress, getAddress };
export { randomBytes, generatePrivateKey, getPubkeyFromPrivateKey, getAddressFromPrivateKey, getPublic, getAddressFromPublicKey, toChecksumAddress, sign, getContractAddress, verifySignature, recoverPublicKey, recoverAddress, isValidChecksumAddress, validatePrivateKey, encrypt, decrypt, encryptPhrase, decryptPhrase, isHexable, isArrayish, arrayify, concat, stripZeros, padZeros, isHexString, hexlify, hexDataLength, hexDataSlice, hexStripZeros, hexZeroPad, bytesPadLeft, bytesPadRight, isSignature, splitSignature, joinSignature, hexToByteArray, hexToIntArray, isHex, encode, decode, keccak256, UNKNOWN_ERROR, NOT_IMPLEMENTED, MISSING_NEW, CALL_EXCEPTION, INVALID_ARGUMENT, MISSING_ARGUMENT, UNEXPECTED_ARGUMENT, NUMERIC_FAULT, INSUFFICIENT_FUNDS, NONCE_EXPIRED, REPLACEMENT_UNDERPRICED, UNSUPPORTED_OPERATION, throwError, checkNew, checkArgumentCount, setCensorship, checkNormalize, setLogLevel, warn, info, bech32Encode, bech32Decode, HRP, tHRP, convertBits, toBech32, fromBech32, HarmonyAddress, getAddress };
//# sourceMappingURL=index.esm.js.map

@@ -600,9 +600,9 @@ /**

}
function sha3_256(data) {
var arrayified = arrayify(data);
if (arrayified) {
return '0x' + sha3.sha3_256(arrayified);
}
throw new Error('arrayify failed');
}
// export function sha3_256(data: Arrayish): string {
// const arrayified = arrayify(data);
// if (arrayified) {
// return '0x' + sha3.sha3_256(arrayified);
// }
// throw new Error('arrayify failed');
// }

@@ -1426,3 +1426,2 @@ // this file is ported from https://github.com/ethers-io/ethers.js/blob/master/src.ts/utils/rlp.ts

exports.keccak256 = keccak256;
exports.sha3_256 = sha3_256;
exports.UNKNOWN_ERROR = UNKNOWN_ERROR;

@@ -1429,0 +1428,0 @@ exports.NOT_IMPLEMENTED = NOT_IMPLEMENTED;

import { Arrayish } from './bytes';
export declare function keccak256(data: Arrayish): string;
export declare function sha3_256(data: Arrayish): string;
//# sourceMappingURL=keccak256.d.ts.map

@@ -15,10 +15,9 @@ "use strict";

exports.keccak256 = keccak256;
function sha3_256(data) {
var arrayified = bytes_1.arrayify(data);
if (arrayified) {
return '0x' + sha3.sha3_256(arrayified);
}
throw new Error('arrayify failed');
}
exports.sha3_256 = sha3_256;
// export function sha3_256(data: Arrayish): string {
// const arrayified = arrayify(data);
// if (arrayified) {
// return '0x' + sha3.sha3_256(arrayified);
// }
// throw new Error('arrayify failed');
// }
//# sourceMappingURL=keccak256.js.map
{
"name": "@harmony-js/crypto",
"version": "0.1.28",
"version": "0.1.32",
"description": "crypto libraries for harmony",

@@ -33,3 +33,3 @@ "main": "dist/index.js",

},
"gitHead": "1ccc7071aee39a4597caa1019c36104420499af9"
"gitHead": "8148f89f3ebe2cc634ba0bf8ea715670eb955a4f"
}

@@ -14,8 +14,8 @@ // this file is ported from 'ether.js' and done some fixes

export function sha3_256(data: Arrayish): string {
const arrayified = arrayify(data);
if (arrayified) {
return '0x' + sha3.sha3_256(arrayified);
}
throw new Error('arrayify failed');
}
// export function sha3_256(data: Arrayish): string {
// const arrayified = arrayify(data);
// if (arrayified) {
// return '0x' + sha3.sha3_256(arrayified);
// }
// throw new Error('arrayify failed');
// }
{
"extends": "../../tsconfig.test.json",
"include": ["src", "__test__", "../../typings/**/*.d.ts"],
"include": ["src", "test", "../../typings/**/*.d.ts"],
"references": []
}

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