@qevm/keccak256 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Richard Moore
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ KECCAK256 Hash Function
2
+ =======================
3
+
4
+ This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
5
+
6
+ It is responsible for the identify function (i.e. KECCAK256) use in Ethereum.
7
+
8
+ For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/hashing/#utils-keccak256).
9
+
10
+
11
+ Importing
12
+ ---------
13
+
14
+ Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
15
+ but for those with more specific needs, individual components can be imported.
16
+
17
+ ```javascript
18
+ const {
19
+
20
+ keccak256
21
+
22
+ } = require("@ethersproject/keccak256");
23
+ ```
24
+
25
+
26
+ License
27
+ -------
28
+
29
+ MIT License
@@ -0,0 +1,2 @@
1
+ export declare const version = "keccak256/5.7.0";
2
+ //# sourceMappingURL=_version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.version = void 0;
4
+ exports.version = "keccak256/5.7.0";
5
+ //# sourceMappingURL=_version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iBAAiB,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { BytesLike } from "@qevm/bytes";
2
+ export declare function keccak256(data: BytesLike): string;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEjD"}
package/lib/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.keccak256 = keccak256;
7
+ const js_sha3_1 = __importDefault(require("js-sha3"));
8
+ const bytes_1 = require("@qevm/bytes");
9
+ function keccak256(data) {
10
+ return '0x' + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAMb,8BAEC;AAND,sDAA2B;AAE3B,uCAAkD;AAElD,SAAgB,SAAS,CAAC,IAAe;IACrC,OAAO,IAAI,GAAG,iBAAI,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "author": "Eugene Kuleshov",
3
+ "dependencies": {
4
+ "@qevm/bytes": "5.7.1",
5
+ "js-sha3": "0.8.0"
6
+ },
7
+ "description": "The keccak256 hash function for qethers.",
8
+ "keywords": [
9
+ "QuantumEVM",
10
+ "qethers"
11
+ ],
12
+ "license": "MIT",
13
+ "main": "./lib/index.js",
14
+ "module": "./lib.esm/index.js",
15
+ "name": "@qevm/keccak256",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "test": "echo \"Error: no test specified\" && exit 1"
21
+ },
22
+ "sideEffects": false,
23
+ "tarballHash": "0x37a7d1dd604198317d0d61c892bbdcff7f8c88420f5e6f5dd9c73c2dc0de026a",
24
+ "types": "./lib/index.d.ts",
25
+ "version": "5.7.0"
26
+ }
@@ -0,0 +1 @@
1
+ export const version = "keccak256/5.7.0";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ import sha3 from "js-sha3";
4
+
5
+ import { arrayify, BytesLike } from "@qevm/bytes";
6
+
7
+ export function keccak256(data: BytesLike): string {
8
+ return '0x' + sha3.keccak_256(arrayify(data));
9
+ }