@0xsequence/utils
Advanced tools
Comparing version 0.8.0 to 0.8.1
# @0xsequence/utils | ||
## 0.8.1 | ||
### Patch Changes | ||
- - variety of optimizations | ||
## 0.8.0 | ||
@@ -4,0 +10,0 @@ |
@@ -8,2 +8,10 @@ 'use strict'; | ||
const encodeMessageDigest = message => { | ||
if (typeof message === 'string') { | ||
return ethers.ethers.utils.arrayify(ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(message))); | ||
} else { | ||
return ethers.ethers.utils.arrayify(ethers.ethers.utils.keccak256(message)); | ||
} | ||
}; | ||
const isNode = () => { | ||
@@ -106,2 +114,3 @@ if (typeof window === 'undefined' && typeof process === 'object') { | ||
}); | ||
exports.encodeMessageDigest = encodeMessageDigest; | ||
exports.encodeTypedDataDigest = encodeTypedDataDigest; | ||
@@ -108,0 +117,0 @@ exports.encodeTypedDataHash = encodeTypedDataHash; |
@@ -8,2 +8,10 @@ 'use strict'; | ||
const encodeMessageDigest = message => { | ||
if (typeof message === 'string') { | ||
return ethers.ethers.utils.arrayify(ethers.ethers.utils.keccak256(ethers.ethers.utils.toUtf8Bytes(message))); | ||
} else { | ||
return ethers.ethers.utils.arrayify(ethers.ethers.utils.keccak256(message)); | ||
} | ||
}; | ||
const isNode = () => { | ||
@@ -106,2 +114,3 @@ if (typeof window === 'undefined' && typeof process === 'object') { | ||
}); | ||
exports.encodeMessageDigest = encodeMessageDigest; | ||
exports.encodeTypedDataDigest = encodeTypedDataDigest; | ||
@@ -108,0 +117,0 @@ exports.encodeTypedDataHash = encodeTypedDataHash; |
import { ethers } from 'ethers'; | ||
export { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from '@ethersproject/properties'; | ||
const encodeMessageDigest = message => { | ||
if (typeof message === 'string') { | ||
return ethers.utils.arrayify(ethers.utils.keccak256(ethers.utils.toUtf8Bytes(message))); | ||
} else { | ||
return ethers.utils.arrayify(ethers.utils.keccak256(message)); | ||
} | ||
}; | ||
const isNode = () => { | ||
@@ -65,2 +73,2 @@ if (typeof window === 'undefined' && typeof process === 'object') { | ||
export { encodeTypedDataDigest, encodeTypedDataHash, getRandomInt, isBrowser, isNode, promisify, sanitizeNumberString, sleep, urlClean }; | ||
export { encodeMessageDigest, encodeTypedDataDigest, encodeTypedDataHash, getRandomInt, isBrowser, isNode, promisify, sanitizeNumberString, sleep, urlClean }; |
@@ -0,1 +1,2 @@ | ||
export * from './digest'; | ||
export * from './is-node-or-browser'; | ||
@@ -2,0 +3,0 @@ export * from './promisify'; |
{ | ||
"name": "@0xsequence/utils", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "utils sub-package for Sequence", | ||
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/utils", | ||
"source": "src/index.ts", | ||
@@ -6,0 +7,0 @@ "main": "dist/0xsequence-utils.cjs.js", |
@0xsequence/utils | ||
================= | ||
... | ||
See [0xsequence project page](https://github.com/0xsequence/sequence.js). |
@@ -0,1 +1,2 @@ | ||
export * from './digest' | ||
export * from './is-node-or-browser' | ||
@@ -2,0 +3,0 @@ export * from './promisify' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
16787
28
414