@metamask-previews/utils 11.12.1-preview-9962b7e

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/LICENSE +15 -0
  3. package/README.md +106 -0
  4. package/dist/assert.d.ts +61 -0
  5. package/dist/assert.d.ts.map +1 -0
  6. package/dist/assert.js +115 -0
  7. package/dist/assert.js.map +1 -0
  8. package/dist/base64.d.ts +25 -0
  9. package/dist/base64.d.ts.map +1 -0
  10. package/dist/base64.js +30 -0
  11. package/dist/base64.js.map +1 -0
  12. package/dist/bytes.d.ts +198 -0
  13. package/dist/bytes.d.ts.map +1 -0
  14. package/dist/bytes.js +406 -0
  15. package/dist/bytes.js.map +1 -0
  16. package/dist/caip-types.d.ts +294 -0
  17. package/dist/caip-types.d.ts.map +1 -0
  18. package/dist/caip-types.js +369 -0
  19. package/dist/caip-types.js.map +1 -0
  20. package/dist/checksum.d.ts +2 -0
  21. package/dist/checksum.d.ts.map +1 -0
  22. package/dist/checksum.js +4 -0
  23. package/dist/checksum.js.map +1 -0
  24. package/dist/coercers.d.ts +97 -0
  25. package/dist/coercers.d.ts.map +1 -0
  26. package/dist/coercers.js +159 -0
  27. package/dist/coercers.js.map +1 -0
  28. package/dist/collections.d.ts +39 -0
  29. package/dist/collections.d.ts.map +1 -0
  30. package/dist/collections.js +105 -0
  31. package/dist/collections.js.map +1 -0
  32. package/dist/encryption-types.d.ts +7 -0
  33. package/dist/encryption-types.d.ts.map +1 -0
  34. package/dist/encryption-types.js +2 -0
  35. package/dist/encryption-types.js.map +1 -0
  36. package/dist/errors.d.ts +68 -0
  37. package/dist/errors.d.ts.map +1 -0
  38. package/dist/errors.js +121 -0
  39. package/dist/errors.js.map +1 -0
  40. package/dist/fs.d.ts +133 -0
  41. package/dist/fs.d.ts.map +1 -0
  42. package/dist/fs.js +210 -0
  43. package/dist/fs.js.map +1 -0
  44. package/dist/hashing.d.ts +28 -0
  45. package/dist/hashing.d.ts.map +1 -0
  46. package/dist/hashing.js +59 -0
  47. package/dist/hashing.js.map +1 -0
  48. package/dist/hex.d.ts +117 -0
  49. package/dist/hex.d.ts.map +1 -0
  50. package/dist/hex.js +174 -0
  51. package/dist/hex.js.map +1 -0
  52. package/dist/index.d.ts +26 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +21 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/json.d.ts +398 -0
  57. package/dist/json.d.ts.map +1 -0
  58. package/dist/json.js +402 -0
  59. package/dist/json.js.map +1 -0
  60. package/dist/keyring.d.ts +243 -0
  61. package/dist/keyring.d.ts.map +1 -0
  62. package/dist/keyring.js +2 -0
  63. package/dist/keyring.js.map +1 -0
  64. package/dist/logging.d.ts +30 -0
  65. package/dist/logging.d.ts.map +1 -0
  66. package/dist/logging.js +35 -0
  67. package/dist/logging.js.map +1 -0
  68. package/dist/misc.d.ts +127 -0
  69. package/dist/misc.d.ts.map +1 -0
  70. package/dist/misc.js +142 -0
  71. package/dist/misc.js.map +1 -0
  72. package/dist/mnemonic.d.ts +14 -0
  73. package/dist/mnemonic.d.ts.map +1 -0
  74. package/dist/mnemonic.js +25 -0
  75. package/dist/mnemonic.js.map +1 -0
  76. package/dist/node.d.ts +3 -0
  77. package/dist/node.d.ts.map +1 -0
  78. package/dist/node.js +3 -0
  79. package/dist/node.js.map +1 -0
  80. package/dist/number.d.ts +74 -0
  81. package/dist/number.d.ts.map +1 -0
  82. package/dist/number.js +95 -0
  83. package/dist/number.js.map +1 -0
  84. package/dist/opaque.d.ts +6 -0
  85. package/dist/opaque.d.ts.map +1 -0
  86. package/dist/opaque.js +2 -0
  87. package/dist/opaque.js.map +1 -0
  88. package/dist/promise.d.ts +45 -0
  89. package/dist/promise.d.ts.map +1 -0
  90. package/dist/promise.js +40 -0
  91. package/dist/promise.js.map +1 -0
  92. package/dist/superstruct.d.ts +20 -0
  93. package/dist/superstruct.d.ts.map +1 -0
  94. package/dist/superstruct.js +24 -0
  95. package/dist/superstruct.js.map +1 -0
  96. package/dist/time.d.ts +49 -0
  97. package/dist/time.d.ts.map +1 -0
  98. package/dist/time.js +62 -0
  99. package/dist/time.js.map +1 -0
  100. package/dist/transaction-types.d.ts +117 -0
  101. package/dist/transaction-types.d.ts.map +1 -0
  102. package/dist/transaction-types.js +2 -0
  103. package/dist/transaction-types.js.map +1 -0
  104. package/dist/unitsConversion.d.ts +80 -0
  105. package/dist/unitsConversion.d.ts.map +1 -0
  106. package/dist/unitsConversion.js +209 -0
  107. package/dist/unitsConversion.js.map +1 -0
  108. package/dist/versions.d.ts +101 -0
  109. package/dist/versions.d.ts.map +1 -0
  110. package/dist/versions.js +85 -0
  111. package/dist/versions.js.map +1 -0
  112. package/package.json +122 -0
package/package.json ADDED
@@ -0,0 +1,122 @@
1
+ {
2
+ "name": "@metamask-previews/utils",
3
+ "version": "11.12.1-preview-9962b7e",
4
+ "description": "Various JavaScript/TypeScript utilities of wide relevance to the MetaMask codebase",
5
+ "homepage": "https://github.com/MetaMask/utils#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/MetaMask/utils/issues"
8
+ },
9
+ "license": "ISC",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/MetaMask/utils.git"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "type": "module",
18
+ "sideEffects": false,
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./node": {
26
+ "types": "./dist/node.d.ts",
27
+ "default": "./dist/node.js"
28
+ },
29
+ "./package.json": "./package.json"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc --project tsconfig.build.json",
37
+ "build:clean": "yarn build:only-clean && yarn build",
38
+ "build:docs": "typedoc",
39
+ "build:only-clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
40
+ "lint": "yarn lint:eslint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog",
41
+ "lint:changelog": "auto-changelog validate --prettier",
42
+ "lint:constraints": "yarn constraints",
43
+ "lint:dependencies": "depcheck && yarn dedupe",
44
+ "lint:eslint": "eslint . --cache",
45
+ "lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies && yarn lint:changelog",
46
+ "lint:misc": "oxfmt --ignore-path .gitignore",
47
+ "test": "yarn test:source && yarn test:types",
48
+ "test:source": "jest && jest-it-up --config jest.config.cjs",
49
+ "test:types": "tsd --files 'src/*.test-d.ts'",
50
+ "test:watch": "jest --watch"
51
+ },
52
+ "dependencies": {
53
+ "@ethereumjs/tx": "^5.4.0",
54
+ "@metamask/scure-bip39": "^2.1.1",
55
+ "@metamask/superstruct": "^3.4.1",
56
+ "@noble/hashes": "^1.8.0",
57
+ "@scure/base": "^1.2.6",
58
+ "@types/debug": "^4.1.7",
59
+ "@types/lodash": "^4.17.20",
60
+ "debug": "^4.3.4",
61
+ "lodash": "^4.17.21",
62
+ "pony-cause": "^2.1.10",
63
+ "semver": "^7.6.3",
64
+ "uuid": "^9.0.1"
65
+ },
66
+ "devDependencies": {
67
+ "@lavamoat/allow-scripts": "^3.0.4",
68
+ "@lavamoat/preinstall-always-fail": "^2.1.0",
69
+ "@metamask/auto-changelog": "^6.1.0",
70
+ "@metamask/eslint-config": "^15.0.0",
71
+ "@metamask/eslint-config-jest": "^15.0.0",
72
+ "@metamask/eslint-config-nodejs": "^15.0.0",
73
+ "@metamask/eslint-config-typescript": "^15.0.0",
74
+ "@types/jest": "^30.0.0",
75
+ "@types/jest-when": "^3.5.3",
76
+ "@types/node": "^22.13.14",
77
+ "@types/semver": "^7",
78
+ "@types/uuid": "^9.0.8",
79
+ "@typescript/native": "npm:typescript@^7.0.2",
80
+ "depcheck": "^1.4.7",
81
+ "eslint": "^9.39.1",
82
+ "eslint-config-prettier": "^9.1.0",
83
+ "eslint-import-resolver-typescript": "^3.6.3",
84
+ "eslint-plugin-import-x": "^4.3.0",
85
+ "eslint-plugin-jest": "^28.8.3",
86
+ "eslint-plugin-jsdoc": "^50.2.4",
87
+ "eslint-plugin-n": "^17.10.3",
88
+ "eslint-plugin-prettier": "^5.2.1",
89
+ "eslint-plugin-promise": "^7.1.0",
90
+ "jest": "^30.4.2",
91
+ "jest-it-up": "^2.0.2",
92
+ "jest-when": "^3.7.0",
93
+ "oxfmt": "^0.44.0",
94
+ "prettier": "^3.3.3",
95
+ "rimraf": "^5.0.5",
96
+ "stdio-mock": "^1.2.0",
97
+ "ts-jest": "^29.4.11",
98
+ "ts-node": "^10.7.0",
99
+ "tsd": "^0.29.0",
100
+ "typedoc": "^0.25.13",
101
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
102
+ "typescript-eslint": "^8.48.0",
103
+ "web3": "^4.16.0"
104
+ },
105
+ "resolutions": {
106
+ "jest-worker@^28.1.3": "patch:jest-worker@npm%3A28.1.3#./.yarn/patches/jest-worker-npm-28.1.3-5d0ff9006c.patch"
107
+ },
108
+ "tsd": {
109
+ "directory": "src"
110
+ },
111
+ "engines": {
112
+ "node": "^22.14.0 || ^24"
113
+ },
114
+ "packageManager": "yarn@4.17.1+sha256.471ffb15e0523663865bbf46a69e7d157ecf532412eb436c48dfab6e3f2abe88",
115
+ "lavamoat": {
116
+ "allowScripts": {
117
+ "@lavamoat/preinstall-always-fail": false,
118
+ "eslint-plugin-import-x>unrs-resolver": false,
119
+ "jest>@jest/core>jest-haste-map>@parcel/watcher": false
120
+ }
121
+ }
122
+ }