Commit 47065870 authored by imtase's avatar imtase
Browse files

refactor: trim browser crypto shims

parent c2aeb2ad
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -249,6 +249,10 @@ const cryptoUtils = {
}
```

##### Browser crypto footprint

The browser bundle keeps the public key, signature, transaction digest, and memo-encryption behavior compatible with Node. Hashing is provided by `@noble/hashes`, and memo AES-256-CBC encryption/decryption is provided by `aes-js`, so the bundle does not need the generic Browserify `crypto` shim path (`crypto-browserify`, `browserify-sign`, or `create-ecdh`) for these helpers. The `secp256k1` dependency is still required for key and signature operations; in browser builds it uses its own JavaScript fallback.

### Tools Class
Some useful functions like mana with regeneration calculation, vote value calculation, etc...

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

−31 KiB (173 KiB)

File changed.

No diff preview for this file type.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+20 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
      "license": "BSD-3-Clause-No-Military-License",
      "dependencies": {
        "@beblurt/blurt-rpc-core": "^0.1.0",
        "@noble/hashes": "^1.8.0",
        "aes-js": "^3.1.2",
        "bs58": "^4.0.1",
        "bytebuffer": "^5.0.1",
        "ecurve": "^1.0.6",
@@ -410,6 +412,18 @@
        "@jridgewell/sourcemap-codec": "^1.4.14"
      }
    },
    "node_modules/@noble/hashes": {
      "version": "1.8.0",
      "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
      "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
      "license": "MIT",
      "engines": {
        "node": "^14.21.3 || >=16"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@nodable/entities": {
      "version": "2.2.0",
      "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.2.0.tgz",
@@ -921,6 +935,12 @@
      "dev": true,
      "license": "MIT"
    },
    "node_modules/aes-js": {
      "version": "3.1.2",
      "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz",
      "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==",
      "license": "MIT"
    },
    "node_modules/ajv": {
      "version": "6.15.0",
      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
Loading