@metamask/utils 11.8.1 → 11.9.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/CHANGELOG.md +8 -1
- package/dist/hashing.cjs +25 -0
- package/dist/hashing.cjs.map +1 -0
- package/dist/hashing.d.cts +10 -0
- package/dist/hashing.d.cts.map +1 -0
- package/dist/hashing.d.mts +10 -0
- package/dist/hashing.d.mts.map +1 -0
- package/dist/hashing.mjs +21 -0
- package/dist/hashing.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [11.9.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `sha256` utility function ([#273](https://github.com/MetaMask/utils/pull/273))
|
|
15
|
+
|
|
10
16
|
## [11.8.1]
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -474,7 +480,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
474
480
|
|
|
475
481
|
- Initial release
|
|
476
482
|
|
|
477
|
-
[Unreleased]: https://github.com/MetaMask/utils/compare/v11.
|
|
483
|
+
[Unreleased]: https://github.com/MetaMask/utils/compare/v11.9.0...HEAD
|
|
484
|
+
[11.9.0]: https://github.com/MetaMask/utils/compare/v11.8.1...v11.9.0
|
|
478
485
|
[11.8.1]: https://github.com/MetaMask/utils/compare/v11.8.0...v11.8.1
|
|
479
486
|
[11.8.0]: https://github.com/MetaMask/utils/compare/v11.7.0...v11.8.0
|
|
480
487
|
[11.7.0]: https://github.com/MetaMask/utils/compare/v11.6.0...v11.7.0
|
package/dist/hashing.cjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sha256 = void 0;
|
|
4
|
+
const sha256_1 = require("@noble/hashes/sha256");
|
|
5
|
+
/**
|
|
6
|
+
* Compute a SHA-256 digest for a given byte array.
|
|
7
|
+
*
|
|
8
|
+
* Uses the native crypto implementation and falls back to noble.
|
|
9
|
+
*
|
|
10
|
+
* @param bytes - A byte array.
|
|
11
|
+
* @returns The SHA-256 hash as a byte array.
|
|
12
|
+
*/
|
|
13
|
+
async function sha256(bytes) {
|
|
14
|
+
// Use crypto.subtle.digest whenever possible as it is faster.
|
|
15
|
+
if ('crypto' in globalThis &&
|
|
16
|
+
typeof globalThis.crypto === 'object' &&
|
|
17
|
+
// eslint-disable-next-line no-restricted-globals
|
|
18
|
+
globalThis.crypto.subtle?.digest) {
|
|
19
|
+
// eslint-disable-next-line no-restricted-globals
|
|
20
|
+
return new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));
|
|
21
|
+
}
|
|
22
|
+
return (0, sha256_1.sha256)(bytes);
|
|
23
|
+
}
|
|
24
|
+
exports.sha256 = sha256;
|
|
25
|
+
//# sourceMappingURL=hashing.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.cjs","sourceRoot":"","sources":["../src/hashing.ts"],"names":[],"mappings":";;;AAAA,iDAA6D;AAE7D;;;;;;;GAOG;AACI,KAAK,UAAU,MAAM,CAAC,KAAiB;IAC5C,8DAA8D;IAC9D,IACE,QAAQ,IAAI,UAAU;QACtB,OAAO,UAAU,CAAC,MAAM,KAAK,QAAQ;QACrC,iDAAiD;QACjD,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAChC;QACA,iDAAiD;QACjD,OAAO,IAAI,UAAU,CACnB,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CACxD,CAAC;KACH;IACD,OAAO,IAAA,eAAW,EAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAdD,wBAcC","sourcesContent":["import { sha256 as nobleSha256 } from '@noble/hashes/sha256';\n\n/**\n * Compute a SHA-256 digest for a given byte array.\n *\n * Uses the native crypto implementation and falls back to noble.\n *\n * @param bytes - A byte array.\n * @returns The SHA-256 hash as a byte array.\n */\nexport async function sha256(bytes: Uint8Array): Promise<Uint8Array> {\n // Use crypto.subtle.digest whenever possible as it is faster.\n if (\n 'crypto' in globalThis &&\n typeof globalThis.crypto === 'object' &&\n // eslint-disable-next-line no-restricted-globals\n globalThis.crypto.subtle?.digest\n ) {\n // eslint-disable-next-line no-restricted-globals\n return new Uint8Array(\n await globalThis.crypto.subtle.digest('SHA-256', bytes),\n );\n }\n return nobleSha256(bytes);\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute a SHA-256 digest for a given byte array.
|
|
3
|
+
*
|
|
4
|
+
* Uses the native crypto implementation and falls back to noble.
|
|
5
|
+
*
|
|
6
|
+
* @param bytes - A byte array.
|
|
7
|
+
* @returns The SHA-256 hash as a byte array.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sha256(bytes: Uint8Array): Promise<Uint8Array>;
|
|
10
|
+
//# sourceMappingURL=hashing.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.d.cts","sourceRoot":"","sources":["../src/hashing.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAcnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute a SHA-256 digest for a given byte array.
|
|
3
|
+
*
|
|
4
|
+
* Uses the native crypto implementation and falls back to noble.
|
|
5
|
+
*
|
|
6
|
+
* @param bytes - A byte array.
|
|
7
|
+
* @returns The SHA-256 hash as a byte array.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sha256(bytes: Uint8Array): Promise<Uint8Array>;
|
|
10
|
+
//# sourceMappingURL=hashing.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.d.mts","sourceRoot":"","sources":["../src/hashing.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAcnE"}
|
package/dist/hashing.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { sha256 as nobleSha256 } from "@noble/hashes/sha256";
|
|
2
|
+
/**
|
|
3
|
+
* Compute a SHA-256 digest for a given byte array.
|
|
4
|
+
*
|
|
5
|
+
* Uses the native crypto implementation and falls back to noble.
|
|
6
|
+
*
|
|
7
|
+
* @param bytes - A byte array.
|
|
8
|
+
* @returns The SHA-256 hash as a byte array.
|
|
9
|
+
*/
|
|
10
|
+
export async function sha256(bytes) {
|
|
11
|
+
// Use crypto.subtle.digest whenever possible as it is faster.
|
|
12
|
+
if ('crypto' in globalThis &&
|
|
13
|
+
typeof globalThis.crypto === 'object' &&
|
|
14
|
+
// eslint-disable-next-line no-restricted-globals
|
|
15
|
+
globalThis.crypto.subtle?.digest) {
|
|
16
|
+
// eslint-disable-next-line no-restricted-globals
|
|
17
|
+
return new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));
|
|
18
|
+
}
|
|
19
|
+
return nobleSha256(bytes);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=hashing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.mjs","sourceRoot":"","sources":["../src/hashing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,6BAA6B;AAE7D;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,KAAiB;IAC5C,8DAA8D;IAC9D,IACE,QAAQ,IAAI,UAAU;QACtB,OAAO,UAAU,CAAC,MAAM,KAAK,QAAQ;QACrC,iDAAiD;QACjD,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAChC;QACA,iDAAiD;QACjD,OAAO,IAAI,UAAU,CACnB,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CACxD,CAAC;KACH;IACD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["import { sha256 as nobleSha256 } from '@noble/hashes/sha256';\n\n/**\n * Compute a SHA-256 digest for a given byte array.\n *\n * Uses the native crypto implementation and falls back to noble.\n *\n * @param bytes - A byte array.\n * @returns The SHA-256 hash as a byte array.\n */\nexport async function sha256(bytes: Uint8Array): Promise<Uint8Array> {\n // Use crypto.subtle.digest whenever possible as it is faster.\n if (\n 'crypto' in globalThis &&\n typeof globalThis.crypto === 'object' &&\n // eslint-disable-next-line no-restricted-globals\n globalThis.crypto.subtle?.digest\n ) {\n // eslint-disable-next-line no-restricted-globals\n return new Uint8Array(\n await globalThis.crypto.subtle.digest('SHA-256', bytes),\n );\n }\n return nobleSha256(bytes);\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./coercers.cjs"), exports);
|
|
|
24
24
|
__exportStar(require("./collections.cjs"), exports);
|
|
25
25
|
__exportStar(require("./encryption-types.cjs"), exports);
|
|
26
26
|
__exportStar(require("./errors.cjs"), exports);
|
|
27
|
+
__exportStar(require("./hashing.cjs"), exports);
|
|
27
28
|
var hex_1 = require("./hex.cjs");
|
|
28
29
|
Object.defineProperty(exports, "HexStruct", { enumerable: true, get: function () { return hex_1.HexStruct; } });
|
|
29
30
|
Object.defineProperty(exports, "StrictHexStruct", { enumerable: true, get: function () { return hex_1.StrictHexStruct; } });
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAAyB;AACzB,+CAAyB;AACzB,8CAAwB;AACxB,mDAA6B;AAC7B,iDAA2B;AAC3B,iDAA2B;AAC3B,oDAA8B;AAC9B,yDAAmC;AACnC,+CAAyB;
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAAyB;AACzB,+CAAyB;AACzB,8CAAwB;AACxB,mDAA6B;AAC7B,iDAA2B;AAC3B,iDAA2B;AAC3B,oDAA8B;AAC9B,yDAAmC;AACnC,+CAAyB;AACzB,gDAA0B;AAE1B,iCAgBe;AAfb,gGAAA,SAAS,OAAA;AACT,sGAAA,eAAe,OAAA;AACf,uGAAA,gBAAgB,OAAA;AAChB,+GAAA,wBAAwB,OAAA;AACxB,kGAAA,WAAW,OAAA;AACX,wGAAA,iBAAiB,OAAA;AACjB,mGAAA,YAAY,OAAA;AACZ,2GAAA,oBAAoB,OAAA;AACpB,wGAAA,iBAAiB,OAAA;AACjB,8GAAA,uBAAuB,OAAA;AACvB,wGAAA,iBAAiB,OAAA;AACjB,yGAAA,kBAAkB,OAAA;AAClB,6GAAA,sBAAsB,OAAA;AACtB,4FAAA,KAAK,OAAA;AACL,+FAAA,QAAQ,OAAA;AAEV,6CAAuB;AACvB,gDAA0B;AAC1B,gDAA0B;AAC1B,6CAAuB;AACvB,+CAAyB;AACzB,+CAAyB;AACzB,gDAA0B;AAC1B,oDAA8B;AAC9B,6CAAuB;AACvB,0DAAoC;AACpC,iDAA2B;AAC3B,yDAM2B;AALzB,wGAAA,KAAK,OAAA;AACL,0GAAA,OAAO,OAAA;AACP,iHAAA,cAAc,OAAA;AACd,iHAAA,cAAc,OAAA;AACd,0GAAA,OAAO,OAAA","sourcesContent":["export * from './assert';\nexport * from './base64';\nexport * from './bytes';\nexport * from './caip-types';\nexport * from './checksum';\nexport * from './coercers';\nexport * from './collections';\nexport * from './encryption-types';\nexport * from './errors';\nexport * from './hashing';\nexport type { Hex } from './hex';\nexport {\n HexStruct,\n StrictHexStruct,\n HexAddressStruct,\n HexChecksumAddressStruct,\n isHexString,\n isStrictHexString,\n isHexAddress,\n isHexChecksumAddress,\n assertIsHexString,\n assertIsStrictHexString,\n isValidHexAddress,\n getChecksumAddress,\n isValidChecksumAddress,\n add0x,\n remove0x,\n} from './hex';\nexport * from './json';\nexport * from './keyring';\nexport * from './logging';\nexport * from './misc';\nexport * from './number';\nexport * from './opaque';\nexport * from './promise';\nexport * from './superstruct';\nexport * from './time';\nexport * from './transaction-types';\nexport * from './versions';\nexport {\n toWei,\n fromWei,\n numberToString,\n getValueOfUnit,\n unitMap,\n} from './unitsConversion';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./coercers.cjs";
|
|
|
7
7
|
export * from "./collections.cjs";
|
|
8
8
|
export * from "./encryption-types.cjs";
|
|
9
9
|
export * from "./errors.cjs";
|
|
10
|
+
export * from "./hashing.cjs";
|
|
10
11
|
export type { Hex } from "./hex.cjs";
|
|
11
12
|
export { HexStruct, StrictHexStruct, HexAddressStruct, HexChecksumAddressStruct, isHexString, isStrictHexString, isHexAddress, isHexChecksumAddress, assertIsHexString, assertIsStrictHexString, isValidHexAddress, getChecksumAddress, isValidChecksumAddress, add0x, remove0x, } from "./hex.cjs";
|
|
12
13
|
export * from "./json.cjs";
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;AACzB,YAAY,EAAE,GAAG,EAAE,kBAAc;AACjC,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,EACL,QAAQ,GACT,kBAAc;AACf,2BAAuB;AACvB,8BAA0B;AAC1B,8BAA0B;AAC1B,2BAAuB;AACvB,6BAAyB;AACzB,6BAAyB;AACzB,8BAA0B;AAC1B,kCAA8B;AAC9B,2BAAuB;AACvB,wCAAoC;AACpC,+BAA2B;AAC3B,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,OAAO,GACR,8BAA0B"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;AACzB,8BAA0B;AAC1B,YAAY,EAAE,GAAG,EAAE,kBAAc;AACjC,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,EACL,QAAQ,GACT,kBAAc;AACf,2BAAuB;AACvB,8BAA0B;AAC1B,8BAA0B;AAC1B,2BAAuB;AACvB,6BAAyB;AACzB,6BAAyB;AACzB,8BAA0B;AAC1B,kCAA8B;AAC9B,2BAAuB;AACvB,wCAAoC;AACpC,+BAA2B;AAC3B,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,OAAO,GACR,8BAA0B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./coercers.mjs";
|
|
|
7
7
|
export * from "./collections.mjs";
|
|
8
8
|
export * from "./encryption-types.mjs";
|
|
9
9
|
export * from "./errors.mjs";
|
|
10
|
+
export * from "./hashing.mjs";
|
|
10
11
|
export type { Hex } from "./hex.mjs";
|
|
11
12
|
export { HexStruct, StrictHexStruct, HexAddressStruct, HexChecksumAddressStruct, isHexString, isStrictHexString, isHexAddress, isHexChecksumAddress, assertIsHexString, assertIsStrictHexString, isValidHexAddress, getChecksumAddress, isValidChecksumAddress, add0x, remove0x, } from "./hex.mjs";
|
|
12
13
|
export * from "./json.mjs";
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;AACzB,YAAY,EAAE,GAAG,EAAE,kBAAc;AACjC,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,EACL,QAAQ,GACT,kBAAc;AACf,2BAAuB;AACvB,8BAA0B;AAC1B,8BAA0B;AAC1B,2BAAuB;AACvB,6BAAyB;AACzB,6BAAyB;AACzB,8BAA0B;AAC1B,kCAA8B;AAC9B,2BAAuB;AACvB,wCAAoC;AACpC,+BAA2B;AAC3B,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,OAAO,GACR,8BAA0B"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;AACzB,8BAA0B;AAC1B,YAAY,EAAE,GAAG,EAAE,kBAAc;AACjC,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,EACL,QAAQ,GACT,kBAAc;AACf,2BAAuB;AACvB,8BAA0B;AAC1B,8BAA0B;AAC1B,2BAAuB;AACvB,6BAAyB;AACzB,6BAAyB;AACzB,8BAA0B;AAC1B,kCAA8B;AAC9B,2BAAuB;AACvB,wCAAoC;AACpC,+BAA2B;AAC3B,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,OAAO,GACR,8BAA0B"}
|
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./coercers.mjs";
|
|
|
7
7
|
export * from "./collections.mjs";
|
|
8
8
|
export * from "./encryption-types.mjs";
|
|
9
9
|
export * from "./errors.mjs";
|
|
10
|
+
export * from "./hashing.mjs";
|
|
10
11
|
export { HexStruct, StrictHexStruct, HexAddressStruct, HexChecksumAddressStruct, isHexString, isStrictHexString, isHexAddress, isHexChecksumAddress, assertIsHexString, assertIsStrictHexString, isValidHexAddress, getChecksumAddress, isValidChecksumAddress, add0x, remove0x } from "./hex.mjs";
|
|
11
12
|
export * from "./json.mjs";
|
|
12
13
|
export * from "./keyring.mjs";
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAAyB;AACzB,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,+BAA2B;AAC3B,+BAA2B;AAC3B,kCAA8B;AAC9B,uCAAmC;AACnC,6BAAyB;AACzB,8BAA0B;AAE1B,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,EACL,QAAQ,EACT,kBAAc;AACf,2BAAuB;AACvB,8BAA0B;AAC1B,8BAA0B;AAC1B,2BAAuB;AACvB,6BAAyB;AACzB,6BAAyB;AACzB,8BAA0B;AAC1B,kCAA8B;AAC9B,2BAAuB;AACvB,wCAAoC;AACpC,+BAA2B;AAC3B,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,OAAO,EACR,8BAA0B","sourcesContent":["export * from './assert';\nexport * from './base64';\nexport * from './bytes';\nexport * from './caip-types';\nexport * from './checksum';\nexport * from './coercers';\nexport * from './collections';\nexport * from './encryption-types';\nexport * from './errors';\nexport * from './hashing';\nexport type { Hex } from './hex';\nexport {\n HexStruct,\n StrictHexStruct,\n HexAddressStruct,\n HexChecksumAddressStruct,\n isHexString,\n isStrictHexString,\n isHexAddress,\n isHexChecksumAddress,\n assertIsHexString,\n assertIsStrictHexString,\n isValidHexAddress,\n getChecksumAddress,\n isValidChecksumAddress,\n add0x,\n remove0x,\n} from './hex';\nexport * from './json';\nexport * from './keyring';\nexport * from './logging';\nexport * from './misc';\nexport * from './number';\nexport * from './opaque';\nexport * from './promise';\nexport * from './superstruct';\nexport * from './time';\nexport * from './transaction-types';\nexport * from './versions';\nexport {\n toWei,\n fromWei,\n numberToString,\n getValueOfUnit,\n unitMap,\n} from './unitsConversion';\n"]}
|
package/package.json
CHANGED