diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..7a65628c --- /dev/null +++ b/.envrc @@ -0,0 +1,7 @@ +if [[ $(type -t use_flake) != function ]]; then + echo "ERROR: use_flake function missing." + echo "Please update direnv to v2.30.0 or later." + exit 1 +fi + +use flake diff --git a/.gitignore b/.gitignore index b6f19ea3..5a9d8f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ coverage-integration tmp/ dist/ +.direnv/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..10eb4261 --- /dev/null +++ b/flake.lock @@ -0,0 +1,108 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1695973661, + "narHash": "sha256-BP2H4c42GThPIhERtTpV1yCtwQHYHEKdRu7pjrmQAwo=", + "owner": "numtide", + "repo": "devshell", + "rev": "cd4e2fda3150dd2f689caeac07b7f47df5197c31", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1677383253, + "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9952d6bc395f5841262b006fbace8dd7e143b634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1741402956, + "narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed0b1881565c1ffef490c10d663d4f542031dad3", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2", + "unstableNixPkgs": "unstableNixPkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "unstableNixPkgs": { + "locked": { + "lastModified": 1696193975, + "narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..d728b658 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "virtual environments"; + + inputs = { + devshell.url = "github:numtide/devshell"; + flake-utils.url = "github:numtide/flake-utils"; + unstableNixPkgs.url = "nixpkgs/nixos-unstable"; + }; + + outputs = { self, flake-utils, devshell, nixpkgs, unstableNixPkgs, ... }@inputs: + let + overlays.default = final: prev: + let + packages = self.packages.${final.system}; + inherit (packages) node-packages; + in + { + nodejs = final.nodejs-18_x; + nodePackages = prev.nodePackages; + yarn = (import unstableNixPkgs { system = final.system; }).yarn-berry; + }; + in + flake-utils.lib.eachDefaultSystem (system: { + devShell = + let pkgs = import nixpkgs { + inherit system; + + overlays = [ + devshell.overlays.default + overlays.default + ]; + }; + in + pkgs.devshell.mkShell { + packages = with pkgs; [ + nixpkgs-fmt + nodejs_22 + yarn + ]; + }; + }); +} diff --git a/lavamoat/node/policy-override.json b/lavamoat/node/policy-override.json new file mode 100644 index 00000000..9e943b89 --- /dev/null +++ b/lavamoat/node/policy-override.json @@ -0,0 +1,411 @@ +{ + "resources": { + "@hathor/wallet-lib>bitcore-lib>bip-schnorr>js-sha256": { + "globals": { + "Array.isArray": true, + "ArrayBuffer.isView": true, + "Object.prototype": true, + "Array.prototype": true, + "process": true, + "root": true, + "window": true, + "global": true, + "module": true, + "exports": true, + "__dirname": true, + "__filename": true, + "require": "write" + }, + "packages": { + "js-sha256": true + }, + "builtin": { + "crypto": true, + "buffer": true, + "stream": true, + "util": true, + "path": true, + "fs": true, + "module": true, + "require": true + }, + "native": true, + "environment": "node", + "moduleSystem": true + }, + "lavamoat>node-gyp-build": { + "builtin": { + "path": true, + "fs": true, + "os": true + }, + "globals": { + "process": true, + "__filename": true, + "__dirname": true, + "Buffer": true + }, + "packages": { + "@hathor/wallet-lib>level>classic-level": true, + "classic-level": true + }, + "native": true + }, + "@hathor/wallet-lib>level>classic-level": { + "builtin": { + "fs": true, + "path": true, + "os": true + }, + "globals": { + "process": true, + "__filename": true, + "__dirname": true, + "Buffer": true + }, + "native": true + }, + "classic-level": { + "builtin": { + "fs": true, + "path": true, + "os": true + }, + "globals": { + "process": true, + "__filename": true, + "__dirname": true, + "Buffer": true + }, + "native": true + }, + "@hathor/wallet-lib>level": { + "packages": { + "@hathor/wallet-lib>level>classic-level": true, + "classic-level": true + } + }, + "axios": { + "type": "commonjs", + "environment": "node", + "moduleSystem": true, + "globals": { + "console": true, + "URL": true, + "URLSearchParams": true, + "TextEncoder": true, + "TextDecoder": true, + "AbortController": true, + "FormData": true, + "Blob": true, + "navigator": true, + "process": true, + "Buffer": true, + "global": true, + "require": true, + "module": true, + "exports": true, + "__filename": true, + "__dirname": true + }, + "builtin": { + "http": true, + "https": true, + "url": true, + "stream": true, + "zlib": true, + "util": true, + "net": true, + "tls": true, + "buffer": true, + "path": true, + "fs": true, + "module": true, + "require": true, + "events": true + }, + "packages": { + "follow-redirects": true, + "form-data": true, + "delayed-stream": true, + "combined-stream": true, + "mime-types": true, + "mime-db": true, + "asynckit": true, + "axios>form-data": true, + "proxy-from-env": true, + "axios>proxy-from-env": true, + "axios>follow-redirects": true, + "axios>form-data>combined-stream": true, + "axios>form-data>combined-stream>delayed-stream": true, + "axios>form-data>mime-types": true, + "axios>form-data>mime-types>mime-db": true, + "axios>form-data>asynckit": true + } + }, + "asynckit": { + "builtin": { + "stream": true + } + }, + "axios>form-data>asynckit": { + "builtin": { + "stream": true + } + }, + "mime-types": { + "builtin": { + "path": true + }, + "packages": { + "mime-db": true + } + }, + "axios>form-data>mime-types": { + "builtin": { + "path": true + }, + "packages": { + "mime-db": true, + "axios>form-data>mime-types>mime-db": true + } + }, + "axios>form-data": { + "builtin": { + "util": true, + "stream": true, + "path": true, + "http": true, + "https": true, + "fs": true, + "url": true + }, + "packages": { + "combined-stream": true, + "asynckit": true, + "delayed-stream": true, + "axios>form-data>combined-stream": true, + "mime-types": true, + "mime-db": true, + "axios>form-data>mime-types": true, + "axios>form-data>mime-types>mime-db": true, + "axios>form-data>asynckit": true + } + }, + "axios>form-data>combined-stream>delayed-stream": { + "builtin": { + "stream": true, + "util": true + }, + "globals": { + "process": true, + "Buffer": true, + "setTimeout": true, + "clearTimeout": true + } + }, + "axios>form-data>combined-stream": { + "builtin": { + "util": true, + "stream": true + }, + "globals": { + "process": true, + "Buffer": true + }, + "packages": { + "delayed-stream": true, + "axios>form-data>combined-stream>delayed-stream": true + } + }, + "axios>proxy-from-env": { + "builtin": { + "url": true + }, + "globals": { + "process": true + } + }, + "axios>follow-redirects": { + "builtin": { + "url": true, + "http": true, + "https": true, + "stream": true, + "assert": true, + "util": true + }, + "globals": { + "process": true, + "setTimeout": true, + "clearTimeout": true + } + }, + "@hathor/wallet-lib": { + "environment": "node", + "moduleSystem": true, + "globals": { + "AbortController": true, + "Buffer": true, + "Buffer.alloc": true, + "Buffer.concat": true, + "Buffer.from": true, + "Intl": true, + "Intl.NumberFormat": true, + "TextEncoder": true, + "TextDecoder": true, + "clearInterval": true, + "clearTimeout": true, + "console": true, + "process": true, + "setInterval": true, + "setTimeout": true, + "global": true, + "require": true, + "module": true, + "exports": true + }, + "builtin": { + "assert": true, + "buffer": true, + "crypto": true, + "events": true, + "fs": true, + "http": true, + "https": true, + "net": true, + "path": true, + "stream": true, + "url": true, + "util": true, + "zlib": true, + "module": true, + "require": true, + "os": true + }, + "packages": { + "axios": true, + "bitcore-lib": true, + "bitcore-mnemonic": true, + "crypto-js": true, + "isomorphic-ws": true, + "level": true, + "lodash": true, + "queue-microtask": true, + "zod": true, + "@hathor/wallet-lib>level>classic-level": true, + "classic-level": true, + "@hathor/wallet-lib>level": true + }, + "native": true + }, + "@dinamonetworks/hsm-dinamo": { + "builtin": { + "crypto": true, + "fs": true, + "net": true, + "path": true, + "tls": true + }, + "globals": { + "Buffer.alloc": true, + "Buffer.concat": true, + "Buffer.from": true, + "atob": true, + "btoa": true, + "process": true + }, + "native": true + }, + "express": { + "environment": "node", + "moduleSystem": true, + "globals": { + "process": true, + "Buffer": true, + "console": true, + "setTimeout": true, + "clearTimeout": true, + "require": true, + "module": true, + "exports": true + }, + "builtin": { + "http": true, + "https": true, + "url": true, + "path": true, + "fs": true, + "util": true, + "events": true, + "stream": true, + "net": true, + "module": true, + "require": true + } + }, + "$root": { + "type": "module", + "environment": "node", + "moduleSystem": true, + "globals": { + "process": true, + "console": true, + "Buffer": true, + "URL": true, + "setTimeout": true, + "clearTimeout": true, + "setInterval": true, + "clearInterval": true, + "require": true, + "module": true, + "exports": true, + "__filename": true, + "__dirname": true, + "global": true + }, + "builtin": { + "path": true, + "fs": true, + "http": true, + "https": true, + "stream": true, + "util": true, + "url": true, + "crypto": true, + "assert": true, + "events": true, + "module": true, + "require": true, + "os": true + }, + "packages": { + "axios": true, + "@hathor/wallet-lib": true, + "@hathor/healthcheck-lib": true, + "@dinamonetworks/hsm-dinamo": true, + "express": true, + "express-validator": true, + "jsonwebtoken": true, + "lodash": true, + "morgan": true, + "uuid4": true, + "validator": true, + "winston": true, + "yargs": true, + "classic-level": true + } + } + }, + "packageOverrides": { + "axios": { + "main": "./dist/node/axios.cjs" + } + }, + "nativeModuleOverride": { + "@hathor/wallet-lib>level>classic-level": true, + "classic-level": true, + "lavamoat>node-gyp-build": true, + "@hathor/wallet-lib>level": true + } +} \ No newline at end of file diff --git a/lavamoat/node/policy.json b/lavamoat/node/policy.json new file mode 100644 index 00000000..fb7f43a2 --- /dev/null +++ b/lavamoat/node/policy.json @@ -0,0 +1,1394 @@ +{ + "moduleShims": { + "axios": { + "@hathor/wallet-lib/lib/api/axiosWrapper.js": "require('axios/dist/node/axios.cjs')" + } + }, + "nativeModuleOverride": { + "classic-level": true, + "@hathor/wallet-lib>level>classic-level": true, + "@hathor/wallet-lib>level": true, + "lavamoat>node-gyp-build": true + }, + "packageOverrides": { + "axios": { + "main": "./dist/node/axios.cjs" + } + }, + "resources": { + "$root": { + "builtin": { + "assert": true, + "crypto": true, + "events": true, + "fs": true, + "http": true, + "https": true, + "module": true, + "os": true, + "path": true, + "require": true, + "stream": true, + "url": true, + "util": true + }, + "environment": "node", + "globals": { + "Buffer": true, + "URL": true, + "__dirname": true, + "__filename": true, + "clearInterval": true, + "clearTimeout": true, + "console": true, + "exports": true, + "global": true, + "import": true, + "module": true, + "process": true, + "require": true, + "setInterval": true, + "setTimeout": true + }, + "moduleSystem": true, + "packages": { + "@dinamonetworks/hsm-dinamo": true, + "@hathor/healthcheck-lib": true, + "@hathor/wallet-lib": true, + "axios": true, + "classic-level": true, + "express": true, + "express-validator": true, + "jsonwebtoken": true, + "lodash": true, + "morgan": true, + "uuid4": true, + "validator": true, + "winston": true, + "yargs": true + }, + "type": "module" + }, + "winston>@colors/colors": { + "builtin": { + "os.release": true, + "util.inspect": true + }, + "globals": { + "console.log": true, + "process.argv": true, + "process.env": true, + "process.platform": true, + "process.stderr": true, + "process.stdout": true, + "process.versions.node.split": true + } + }, + "winston>@dabh/diagnostics": { + "builtin": { + "tty.isatty": true + }, + "globals": { + "console": true, + "process.env.DEBUG": true, + "process.env.DIAGNOSTICS": true, + "process.env.NODE_ENV": true + }, + "packages": { + "winston>@dabh/diagnostics>colorspace": true, + "winston>@dabh/diagnostics>enabled": true, + "winston>@dabh/diagnostics>kuler": true + } + }, + "@dinamonetworks/hsm-dinamo": { + "builtin": { + "crypto": true, + "fs": true, + "net": true, + "path": true, + "process": true, + "tls": true + }, + "globals": { + "Buffer.alloc": true, + "Buffer.concat": true, + "Buffer.from": true, + "atob": true, + "btoa": true, + "process": true + }, + "native": true, + "packages": { + "@dinamonetworks/hsm-dinamo>node-aes-cmac": true + } + }, + "@hathor/wallet-lib": { + "builtin": { + "assert": true, + "buffer": true, + "crypto": true, + "events": true, + "fs": true, + "http": true, + "https": true, + "module": true, + "net": true, + "os": true, + "path": true, + "require": true, + "stream": true, + "url": true, + "util": true, + "zlib": true + }, + "environment": "node", + "globals": { + "AbortController": true, + "Buffer": true, + "Intl": true, + "TextDecoder": true, + "TextEncoder": true, + "clearInterval": true, + "clearTimeout": true, + "console": true, + "exports": true, + "global": true, + "import": true, + "module": true, + "process": true, + "require": true, + "setInterval": true, + "setTimeout": true + }, + "moduleSystem": true, + "native": true, + "packages": { + "axios": true, + "bitcore-lib": true, + "@hathor/wallet-lib>bitcore-lib": true, + "bitcore-mnemonic": true, + "@hathor/wallet-lib>bitcore-mnemonic": true, + "classic-level": true, + "@hathor/wallet-lib>level>classic-level": true, + "crypto-js": true, + "@hathor/wallet-lib>crypto-js": true, + "isomorphic-ws": true, + "@hathor/wallet-lib>isomorphic-ws": true, + "level": true, + "@hathor/wallet-lib>level": true, + "lodash": true, + "queue-microtask": true, + "@hathor/wallet-lib>queue-microtask": true, + "zod": true, + "@hathor/wallet-lib>zod": true + } + }, + "@hathor/wallet-lib>abstract-level": { + "builtin": { + "buffer": true, + "events.EventEmitter": true + }, + "globals": { + "TextEncoder": true, + "console": true, + "process.nextTick": true + }, + "packages": { + "@hathor/wallet-lib>abstract-level>catering": true, + "@hathor/wallet-lib>abstract-level>level-supports": true, + "@hathor/wallet-lib>level-transcoder": true, + "@hathor/wallet-lib>abstract-level>module-error": true + } + }, + "express>accepts": { + "packages": { + "axios>form-data>mime-types": true, + "express>accepts>negotiator": true + } + }, + "winston>async": { + "globals": { + "process": true, + "queueMicrotask": true, + "setImmediate": true, + "setTimeout": true + } + }, + "asynckit": { + "builtin": { + "stream": true + } + }, + "axios>form-data>asynckit": { + "builtin": { + "stream": true + } + }, + "axios": { + "builtin": { + "buffer": true, + "events": true, + "fs": true, + "http": true, + "https": true, + "module": true, + "net": true, + "path": true, + "require": true, + "stream": true, + "tls": true, + "url": true, + "util": true, + "zlib": true + }, + "environment": "node", + "globals": { + "AbortController": true, + "Blob": true, + "Buffer": true, + "FormData": true, + "TextDecoder": true, + "TextEncoder": true, + "URL": true, + "URLSearchParams": true, + "__dirname": true, + "__filename": true, + "console": true, + "exports": true, + "global": true, + "import": true, + "module": true, + "navigator": true, + "process": true, + "require": true + }, + "moduleSystem": true, + "packages": { + "asynckit": true, + "axios>form-data>asynckit": true, + "combined-stream": true, + "axios>form-data>combined-stream": true, + "delayed-stream": true, + "axios>form-data>combined-stream>delayed-stream": true, + "follow-redirects": true, + "axios>follow-redirects": true, + "form-data": true, + "axios>form-data": true, + "mime-db": true, + "axios>form-data>mime-types>mime-db": true, + "mime-types": true, + "axios>form-data>mime-types": true, + "proxy-from-env": true, + "axios>proxy-from-env": true + }, + "type": "commonjs" + }, + "@hathor/wallet-lib>bitcore-lib>bs58>base-x": { + "packages": { + "morgan>basic-auth>safe-buffer": true + } + }, + "morgan>basic-auth": { + "packages": { + "morgan>basic-auth>safe-buffer": true + } + }, + "@hathor/wallet-lib>bitcore-lib": { + "builtin": { + "assert": true, + "buffer": true, + "crypto.createHash": true, + "crypto.randomBytes": true, + "url.format": true, + "url.parse": true + }, + "globals": { + "Buffer": true, + "SEQUENCE_LOCKTIME_DISABLE_FLAG": true, + "_bitcore": "write", + "console.error": true, + "crypto": true, + "msCrypto": true, + "process.browser": true + }, + "packages": { + "@hathor/wallet-lib>bitcore-lib>bech32": true, + "@hathor/wallet-lib>bitcore-lib>bn.js": true, + "@hathor/wallet-lib>bitcore-lib>bs58": true, + "@hathor/wallet-lib>bitcore-lib>buffer-compare": true, + "@hathor/wallet-lib>bitcore-lib>elliptic": true, + "@hathor/wallet-lib>bitcore-lib>inherits": true, + "lodash": true + } + }, + "@hathor/wallet-lib>bitcore-mnemonic": { + "builtin": { + "crypto.createHmac": true + }, + "globals": { + "Buffer.alloc": true, + "Buffer.from": true, + "Buffer.isBuffer": true + }, + "packages": { + "@hathor/wallet-lib>bitcore-lib": true, + "@hathor/wallet-lib>bitcore-mnemonic>unorm": true + } + }, + "@hathor/wallet-lib>bitcore-lib>bn.js": { + "builtin": { + "buffer.Buffer": true + } + }, + "@hathor/wallet-lib>bitcore-lib>elliptic>bn.js": { + "builtin": { + "buffer.Buffer": true + }, + "globals": { + "Buffer": true + } + }, + "express>body-parser": { + "builtin": { + "querystring": true, + "zlib.createGunzip": true, + "zlib.createInflate": true + }, + "packages": { + "express>body-parser>bytes": true, + "express>content-type": true, + "morgan>debug": true, + "morgan>depd": true, + "express>send>destroy": true, + "express>http-errors": true, + "express>body-parser>iconv-lite": true, + "express>body-parser>on-finished": true, + "express>qs": true, + "express>body-parser>raw-body": true, + "express>type-is": true, + "express>body-parser>unpipe": true + } + }, + "@hathor/wallet-lib>bitcore-lib>elliptic>brorand": { + "builtin": { + "crypto.randomBytes": true + }, + "globals": { + "crypto": true, + "msCrypto": true + } + }, + "@hathor/wallet-lib>bitcore-lib>bs58": { + "packages": { + "@hathor/wallet-lib>bitcore-lib>bs58>base-x": true + } + }, + "jsonwebtoken>jws>jwa>buffer-equal-constant-time": { + "builtin": { + "buffer.Buffer.isBuffer": true, + "buffer.Buffer.prototype.equal": true, + "buffer.SlowBuffer.prototype.equal": true + } + }, + "eslint-plugin-import>object.values>call-bind": { + "packages": { + "eslint-plugin-import>object.values>call-bind>es-define-property": true, + "eslint-plugin-import>array.prototype.findlastindex>es-errors": true, + "eslint-plugin-import>hasown>function-bind": true, + "eslint-plugin-import>array-includes>get-intrinsic": true, + "eslint-plugin-import>object.values>call-bind>set-function-length": true + } + }, + "@hathor/wallet-lib>abstract-level>catering": { + "globals": { + "process": true + } + }, + "classic-level": { + "builtin": { + "fs": true, + "os": true, + "path": true + }, + "globals": { + "Buffer": true, + "__dirname": true, + "__filename": true, + "process": true + }, + "native": true + }, + "@hathor/wallet-lib>level>classic-level": { + "builtin": { + "fs": true, + "os": true, + "path": true + }, + "globals": { + "Buffer": true, + "__dirname": true, + "__filename": true, + "process": true + }, + "native": true, + "packages": { + "@hathor/wallet-lib>abstract-level": true, + "@hathor/wallet-lib>abstract-level>catering": true, + "@hathor/wallet-lib>abstract-level>module-error": true, + "lavamoat>node-gyp-build": true + } + }, + "winston>@dabh/diagnostics>colorspace>color>color-convert": { + "packages": { + "winston>@dabh/diagnostics>colorspace>color>color-string>color-name": true + } + }, + "winston>@dabh/diagnostics>colorspace>color>color-string": { + "packages": { + "winston>@dabh/diagnostics>colorspace>color>color-string>color-name": true, + "winston>@dabh/diagnostics>colorspace>color>color-string>simple-swizzle": true + } + }, + "winston>@dabh/diagnostics>colorspace>color": { + "packages": { + "winston>@dabh/diagnostics>colorspace>color>color-convert": true, + "winston>@dabh/diagnostics>colorspace>color>color-string": true + } + }, + "winston>@dabh/diagnostics>colorspace": { + "packages": { + "winston>@dabh/diagnostics>colorspace>color": true, + "winston>@dabh/diagnostics>colorspace>text-hex": true + } + }, + "axios>form-data>combined-stream": { + "builtin": { + "stream": true, + "util": true + }, + "globals": { + "Buffer": true, + "process": true + }, + "packages": { + "delayed-stream": true, + "axios>form-data>combined-stream>delayed-stream": true + } + }, + "express>content-disposition": { + "builtin": { + "path.basename": true + }, + "packages": { + "express>content-disposition>safe-buffer": true + } + }, + "express>cookie-signature": { + "builtin": { + "crypto.createHash": true, + "crypto.createHmac": true + } + }, + "@hathor/wallet-lib>crypto-js": { + "builtin": { + "crypto": true + }, + "globals": { + "crypto": true, + "define": true, + "msCrypto": true + } + }, + "morgan>debug": { + "builtin": { + "fs.SyncWriteStream": true, + "net.Socket": true, + "tty.WriteStream": true, + "tty.isatty": true, + "util": true + }, + "globals": { + "chrome": true, + "console": true, + "document": true, + "localStorage": true, + "navigator": true, + "process": true + }, + "packages": { + "morgan>debug>ms": true + } + }, + "eslint-plugin-import>object.values>define-properties>define-data-property": { + "packages": { + "eslint-plugin-import>object.values>call-bind>es-define-property": true, + "eslint-plugin-import>array.prototype.findlastindex>es-errors": true, + "eslint-plugin-import>array-includes>es-abstract>gopd": true + } + }, + "axios>form-data>combined-stream>delayed-stream": { + "builtin": { + "stream": true, + "util": true + }, + "globals": { + "Buffer": true, + "clearTimeout": true, + "process": true, + "setTimeout": true + } + }, + "morgan>depd": { + "builtin": { + "path.relative": true + }, + "globals": { + "process": true + } + }, + "express>send>destroy": { + "builtin": { + "events.EventEmitter": true, + "fs.ReadStream": true, + "stream": true, + "zlib.Deflate": true, + "zlib.DeflateRaw": true, + "zlib.Gunzip": true, + "zlib.Gzip": true, + "zlib.Inflate": true, + "zlib.InflateRaw": true, + "zlib.Unzip": true + } + }, + "jsonwebtoken>jws>jwa>ecdsa-sig-formatter": { + "packages": { + "morgan>basic-auth>safe-buffer": true + } + }, + "@hathor/wallet-lib>bitcore-lib>elliptic": { + "packages": { + "@hathor/wallet-lib>bitcore-lib>elliptic>bn.js": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>brorand": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>hash.js": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>hmac-drbg": true, + "express>http-errors>inherits": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>minimalistic-assert": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>minimalistic-crypto-utils": true + } + }, + "eslint-plugin-import>object.values>call-bind>es-define-property": { + "packages": { + "eslint-plugin-import>array-includes>get-intrinsic": true + } + }, + "express>etag": { + "builtin": { + "crypto.createHash": true, + "fs.Stats": true + }, + "globals": { + "Buffer.byteLength": true, + "Buffer.isBuffer": true + } + }, + "express": { + "builtin": { + "events": true, + "fs": true, + "http": true, + "https": true, + "module": true, + "net": true, + "path": true, + "querystring.parse": true, + "require": true, + "stream": true, + "url": true, + "util": true + }, + "environment": "node", + "globals": { + "Buffer": true, + "clearTimeout": true, + "console": true, + "exports": true, + "module": true, + "process": true, + "require": true, + "setImmediate": true, + "setTimeout": true + }, + "moduleSystem": true, + "packages": { + "express>accepts": true, + "express>array-flatten": true, + "express>body-parser": true, + "express>content-disposition": true, + "express>content-type": true, + "express>cookie-signature": true, + "express>cookie": true, + "morgan>debug": true, + "morgan>depd": true, + "express>encodeurl": true, + "express>escape-html": true, + "express>etag": true, + "express>finalhandler": true, + "express>fresh": true, + "express>http-errors": true, + "express>merge-descriptors": true, + "express>methods": true, + "express>on-finished": true, + "express>parseurl": true, + "express>path-to-regexp": true, + "express>proxy-addr": true, + "express>qs": true, + "express>range-parser": true, + "express>safe-buffer": true, + "express>send": true, + "express>serve-static": true, + "express>setprototypeof": true, + "express>statuses": true, + "express>type-is": true, + "express>utils-merge": true, + "express>vary": true + } + }, + "express-validator": { + "globals": { + "console.warn": true + }, + "packages": { + "lodash": true, + "validator": true + } + }, + "winston>logform>fecha": { + "globals": { + "define": true + } + }, + "express>finalhandler": { + "globals": { + "Buffer.byteLength": true, + "process.env.NODE_ENV": true, + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>debug": true, + "express>encodeurl": true, + "express>escape-html": true, + "express>finalhandler>on-finished": true, + "express>parseurl": true, + "express>statuses": true, + "express>body-parser>unpipe": true + } + }, + "axios>follow-redirects": { + "builtin": { + "assert": true, + "http": true, + "https": true, + "stream": true, + "url": true, + "util": true + }, + "globals": { + "clearTimeout": true, + "process": true, + "setTimeout": true + } + }, + "axios>form-data": { + "builtin": { + "fs": true, + "http": true, + "https": true, + "path": true, + "stream": true, + "url": true, + "util": true + }, + "packages": { + "asynckit": true, + "axios>form-data>asynckit": true, + "combined-stream": true, + "axios>form-data>combined-stream": true, + "delayed-stream": true, + "mime-db": true, + "axios>form-data>mime-types>mime-db": true, + "mime-types": true, + "axios>form-data>mime-types": true + } + }, + "eslint-plugin-import>array-includes>get-intrinsic": { + "globals": { + "AggregateError": true, + "FinalizationRegistry": true, + "WeakRef": true + }, + "packages": { + "eslint-plugin-import>array.prototype.findlastindex>es-errors": true, + "eslint-plugin-import>hasown>function-bind": true, + "eslint-plugin-import>array-includes>es-abstract>has-proto": true, + "eslint-config-airbnb-base>object.assign>has-symbols": true, + "eslint-plugin-import>hasown": true + } + }, + "eslint-plugin-import>array-includes>es-abstract>gopd": { + "packages": { + "eslint-plugin-import>array-includes>get-intrinsic": true + } + }, + "eslint-plugin-import>object.values>define-properties>has-property-descriptors": { + "packages": { + "eslint-plugin-import>object.values>call-bind>es-define-property": true + } + }, + "@hathor/wallet-lib>bitcore-lib>elliptic>hash.js": { + "packages": { + "express>http-errors>inherits": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>minimalistic-assert": true + } + }, + "eslint-plugin-import>hasown": { + "packages": { + "eslint-plugin-import>hasown>function-bind": true + } + }, + "@hathor/wallet-lib>bitcore-lib>elliptic>hmac-drbg": { + "packages": { + "@hathor/wallet-lib>bitcore-lib>elliptic>hash.js": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>minimalistic-assert": true, + "@hathor/wallet-lib>bitcore-lib>elliptic>minimalistic-crypto-utils": true + } + }, + "express>http-errors": { + "packages": { + "morgan>depd": true, + "express>http-errors>inherits": true, + "express>setprototypeof": true, + "express>statuses": true, + "express>http-errors>toidentifier": true + } + }, + "express>body-parser>iconv-lite": { + "builtin": { + "buffer.Buffer": true, + "buffer.SlowBuffer.byteLength": true, + "buffer.SlowBuffer.prototype.toString": true, + "buffer.SlowBuffer.prototype.write": true, + "stream.Readable.prototype.collect": true, + "stream.Readable.prototype.setEncoding": true, + "stream.Transform.call": true, + "stream.Transform.prototype": true, + "string_decoder.StringDecoder.call": true, + "string_decoder.StringDecoder.prototype": true + }, + "globals": { + "console.error": true, + "process": true + }, + "packages": { + "express>body-parser>iconv-lite>safer-buffer": true + } + }, + "@hathor/wallet-lib>bitcore-lib>inherits": { + "builtin": { + "util.inherits": true + } + }, + "express>http-errors>inherits": { + "builtin": { + "util.inherits": true + } + }, + "@hathor/wallet-lib>isomorphic-ws": { + "packages": { + "@hathor/wallet-lib>ws": true + } + }, + "@hathor/wallet-lib>bitcore-lib>bip-schnorr>js-sha256": { + "builtin": { + "buffer": true, + "crypto": true, + "fs": true, + "module": true, + "path": true, + "require": true, + "stream": true, + "util": true + }, + "environment": "node", + "globals": { + "Array.isArray": true, + "Array.prototype": true, + "ArrayBuffer.isView": true, + "Object.prototype": true, + "__dirname": true, + "__filename": true, + "exports": true, + "global": true, + "module": true, + "process": true, + "require": "write", + "root": true, + "window": true + }, + "moduleSystem": true, + "native": true, + "packages": { + "js-sha256": true + } + }, + "jsonwebtoken": { + "builtin": { + "crypto.KeyObject": true, + "crypto.createPrivateKey": true, + "crypto.createPublicKey": true, + "crypto.createSecretKey": true + }, + "globals": { + "Buffer.from": true, + "Buffer.isBuffer": true, + "process.version": true + }, + "packages": { + "jsonwebtoken>jws": true, + "jsonwebtoken>lodash.includes": true, + "jsonwebtoken>lodash.isboolean": true, + "jsonwebtoken>lodash.isinteger": true, + "jsonwebtoken>lodash.isnumber": true, + "jsonwebtoken>lodash.isplainobject": true, + "jsonwebtoken>lodash.isstring": true, + "jsonwebtoken>lodash.once": true, + "jsonwebtoken>ms": true, + "jsonwebtoken>semver": true + } + }, + "jsonwebtoken>jws>jwa": { + "builtin": { + "crypto.constants.RSA_PKCS1_PSS_PADDING": true, + "crypto.constants.RSA_PSS_SALTLEN_DIGEST": true, + "crypto.createHmac": true, + "crypto.createPublicKey": true, + "crypto.createSign": true, + "crypto.createVerify": true, + "util": true + }, + "packages": { + "jsonwebtoken>jws>jwa>buffer-equal-constant-time": true, + "jsonwebtoken>jws>jwa>ecdsa-sig-formatter": true, + "morgan>basic-auth>safe-buffer": true + } + }, + "jsonwebtoken>jws": { + "builtin": { + "buffer.Buffer.isBuffer": true, + "stream": true, + "util.format": true, + "util.inherits": true + }, + "globals": { + "process.nextTick": true + }, + "packages": { + "jsonwebtoken>jws>jwa": true, + "morgan>basic-auth>safe-buffer": true + } + }, + "@hathor/wallet-lib>level-transcoder": { + "builtin": { + "buffer": true + }, + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@hathor/wallet-lib>abstract-level>module-error": true + } + }, + "@hathor/wallet-lib>level": { + "packages": { + "classic-level": true, + "@hathor/wallet-lib>level>classic-level": true + } + }, + "lodash": { + "globals": { + "define": true + } + }, + "winston>logform": { + "builtin": { + "util.format": true, + "util.inspect": true + }, + "packages": { + "winston>@colors/colors": true, + "winston>logform>fecha": true, + "winston>logform>ms": true, + "winston>safe-stable-stringify": true, + "winston>triple-beam": true + } + }, + "nodemon>semver>lru-cache": { + "packages": { + "nodemon>semver>lru-cache>yallist": true + } + }, + "express>methods": { + "builtin": { + "http.METHODS": true + } + }, + "mime-types": { + "builtin": { + "path": true + }, + "packages": { + "mime-db": true + } + }, + "axios>form-data>mime-types": { + "builtin": { + "path": true + }, + "packages": { + "mime-db": true, + "axios>form-data>mime-types>mime-db": true + } + }, + "express>send>mime": { + "builtin": { + "fs.readFileSync": true, + "path": true + }, + "globals": { + "console.warn": true, + "process.env.DEBUG_MIME": true + } + }, + "morgan": { + "globals": { + "process.hrtime": true, + "process.stdout": true, + "setTimeout": true + }, + "packages": { + "morgan>basic-auth": true, + "morgan>debug": true, + "morgan>depd": true, + "morgan>on-finished": true, + "morgan>on-headers": true + } + }, + "@dinamonetworks/hsm-dinamo>node-aes-cmac": { + "builtin": { + "crypto.createCipheriv": true + }, + "globals": { + "Buffer": true + } + }, + "lavamoat>node-gyp-build": { + "builtin": { + "fs": true, + "os": true, + "path": true + }, + "globals": { + "Buffer": true, + "__dirname": true, + "__filename": true, + "__non_webpack_require__": true, + "__webpack_require__": true, + "process": true + }, + "native": true, + "packages": { + "classic-level": true, + "@hathor/wallet-lib>level>classic-level": true + } + }, + "express>qs>side-channel>object-inspect": { + "builtin": { + "util.inspect": true + }, + "globals": { + "HTMLElement": true, + "WeakRef": true + } + }, + "express>body-parser>on-finished": { + "builtin": { + "async_hooks": true + }, + "globals": { + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>on-finished>ee-first": true + } + }, + "express>on-finished": { + "builtin": { + "async_hooks": true + }, + "globals": { + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>on-finished>ee-first": true + } + }, + "express>finalhandler>on-finished": { + "builtin": { + "async_hooks": true + }, + "globals": { + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>on-finished>ee-first": true + } + }, + "morgan>on-finished": { + "globals": { + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>on-finished>ee-first": true + } + }, + "express>send>on-finished": { + "builtin": { + "async_hooks": true + }, + "globals": { + "process.nextTick": true, + "setImmediate": true + }, + "packages": { + "morgan>on-finished>ee-first": true + } + }, + "winston>one-time": { + "packages": { + "winston>one-time>fn.name": true + } + }, + "express>parseurl": { + "builtin": { + "url.Url": true, + "url.parse": true + } + }, + "express>proxy-addr": { + "packages": { + "express>proxy-addr>forwarded": true, + "express>proxy-addr>ipaddr.js": true + } + }, + "axios>proxy-from-env": { + "builtin": { + "url": true + }, + "globals": { + "process": true + } + }, + "express>qs": { + "packages": { + "express>qs>side-channel": true + } + }, + "@hathor/wallet-lib>queue-microtask": { + "globals": { + "queueMicrotask": true, + "setTimeout": true + } + }, + "express>body-parser>raw-body": { + "builtin": { + "async_hooks": true + }, + "globals": { + "Buffer.concat": true, + "process.nextTick": true + }, + "packages": { + "express>body-parser>bytes": true, + "express>http-errors": true, + "express>body-parser>iconv-lite": true, + "express>body-parser>unpipe": true + } + }, + "winston>readable-stream": { + "builtin": { + "buffer.Buffer": true, + "events.EventEmitter": true, + "stream": true, + "util": true + }, + "globals": { + "process.env.READABLE_STREAM": true, + "process.nextTick": true, + "process.stderr": true, + "process.stdout": true + }, + "packages": { + "express>http-errors>inherits": true, + "winston>readable-stream>string_decoder": true, + "winston>readable-stream>util-deprecate": true + } + }, + "morgan>basic-auth>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "express>content-disposition>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "express>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "express>body-parser>iconv-lite>safer-buffer": { + "builtin": { + "buffer": true + }, + "globals": { + "process.binding": true + } + }, + "jsonwebtoken>semver": { + "globals": { + "console.error": true, + "process": true + }, + "packages": { + "nodemon>semver>lru-cache": true + } + }, + "express>send": { + "builtin": { + "fs.createReadStream": true, + "fs.stat": true, + "path.extname": true, + "path.join": true, + "path.normalize": true, + "path.resolve": true, + "path.sep": true, + "stream": true, + "util.inherits": true + }, + "globals": { + "Buffer.byteLength": true + }, + "packages": { + "morgan>debug": true, + "morgan>depd": true, + "express>send>destroy": true, + "express>encodeurl": true, + "express>escape-html": true, + "express>etag": true, + "express>fresh": true, + "express>http-errors": true, + "express>send>mime": true, + "express>send>ms": true, + "express>send>on-finished": true, + "express>range-parser": true, + "express>statuses": true + } + }, + "express>serve-static": { + "builtin": { + "path.resolve": true, + "url.format": true + }, + "globals": { + "Buffer.byteLength": true + }, + "packages": { + "express>encodeurl": true, + "express>escape-html": true, + "express>parseurl": true, + "express>send": true + } + }, + "eslint-plugin-import>object.values>call-bind>set-function-length": { + "packages": { + "eslint-plugin-import>object.values>define-properties>define-data-property": true, + "eslint-plugin-import>array.prototype.findlastindex>es-errors": true, + "eslint-plugin-import>array-includes>get-intrinsic": true, + "eslint-plugin-import>array-includes>es-abstract>gopd": true, + "eslint-plugin-import>object.values>define-properties>has-property-descriptors": true + } + }, + "express>qs>side-channel": { + "packages": { + "eslint-plugin-import>object.values>call-bind": true, + "eslint-plugin-import>array-includes>get-intrinsic": true, + "express>qs>side-channel>object-inspect": true + } + }, + "winston>@dabh/diagnostics>colorspace>color>color-string>simple-swizzle": { + "packages": { + "winston>@dabh/diagnostics>colorspace>color>color-string>simple-swizzle>is-arrayish": true + } + }, + "winston>readable-stream>string_decoder": { + "packages": { + "morgan>basic-auth>safe-buffer": true + } + }, + "express>type-is": { + "packages": { + "express>type-is>media-typer": true, + "axios>form-data>mime-types": true + } + }, + "@hathor/wallet-lib>bitcore-mnemonic>unorm": { + "globals": { + "define": true + } + }, + "winston>readable-stream>util-deprecate": { + "builtin": { + "util.deprecate": true + } + }, + "uuid4": { + "builtin": { + "crypto.randomBytes": true + } + }, + "winston": { + "builtin": { + "fs.F_OK": true, + "fs.access": true, + "fs.close": true, + "fs.createReadStream": true, + "fs.createWriteStream": true, + "fs.exists": true, + "fs.existsSync": true, + "fs.mkdirSync": true, + "fs.open": true, + "fs.read": true, + "fs.rename": true, + "fs.stat": true, + "fs.unlink": true, + "http": true, + "https": true, + "os.EOL": true, + "os.loadavg": true, + "os.uptime": true, + "path.basename": true, + "path.dirname": true, + "path.extname": true, + "path.join": true, + "string_decoder.StringDecoder": true, + "util.format": true, + "zlib.createGzip": true + }, + "globals": { + "Buffer.alloc": true, + "Buffer.byteLength": true, + "Buffer.from": true, + "clearTimeout": true, + "console._stderr": true, + "console._stdout": true, + "console.error": true, + "console.log": true, + "console.warn": true, + "process._exiting": true, + "process.argv": true, + "process.cwd": true, + "process.execPath": true, + "process.exit": true, + "process.getgid": true, + "process.getuid": true, + "process.memoryUsage": true, + "process.nextTick": true, + "process.on": true, + "process.pid": true, + "process.removeListener": true, + "process.version": true, + "setImmediate": true, + "setTimeout": true + }, + "packages": { + "winston>@dabh/diagnostics": true, + "winston>async": true, + "winston>is-stream": true, + "winston>logform": true, + "winston>one-time": true, + "winston>readable-stream": true, + "winston>safe-stable-stringify": true, + "winston>stack-trace": true, + "winston>triple-beam": true, + "winston>winston-transport": true + } + }, + "winston>winston-transport": { + "builtin": { + "util.inherits": true + }, + "globals": { + "console.error": true + }, + "packages": { + "winston>readable-stream": true, + "winston>triple-beam": true + } + }, + "@hathor/wallet-lib>ws": { + "builtin": { + "buffer.isUtf8": true, + "crypto.createHash": true, + "crypto.randomBytes": true, + "crypto.randomFillSync": true, + "events": true, + "http.STATUS_CODES": true, + "http.createServer": true, + "http.request": true, + "https.request": true, + "net.connect": true, + "net.isIP": true, + "stream.Duplex": true, + "stream.Readable": true, + "stream.Writable": true, + "tls.connect": true, + "url.URL": true, + "zlib.Z_DEFAULT_WINDOWBITS": true, + "zlib.Z_SYNC_FLUSH": true, + "zlib.createDeflateRaw": true, + "zlib.createInflateRaw": true + }, + "globals": { + "Buffer": true, + "clearTimeout": true, + "process.env.WS_NO_BUFFER_UTIL": true, + "process.env.WS_NO_UTF_8_VALIDATE": true, + "process.nextTick": true, + "setImmediate": true, + "setTimeout": true + } + }, + "@hathor/wallet-lib>zod": { + "globals": { + "URL": true + } + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6179631a..9f5331f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "eslint-config-airbnb-base": "15.0.0", "eslint-plugin-import": "2.29.1", "jest": "29.7.0", + "lavamoat": "^9.0.7", "mock-socket": "9.3.1", "nodemon": "3.1.0", "superagent": "9.0.2", @@ -99,13 +100,15 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -210,15 +213,47 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", + "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@babel/parser": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.9" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/generator/node_modules/@babel/types": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -554,19 +589,21 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -609,14 +646,16 @@ } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", + "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.25.9", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -646,10 +685,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.5.tgz", + "integrity": "sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==", "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.5" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -1938,33 +1981,62 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/parser": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.9" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.5.tgz", + "integrity": "sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.5", + "@babel/parser": "^7.26.5", + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1996,14 +2068,14 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz", + "integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2041,6 +2113,13 @@ "node-aes-cmac": "^0.1.1" } }, + "node_modules/@endo/env-options": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@endo/env-options/-/env-options-1.1.8.tgz", + "integrity": "sha512-Xtxw9n33I4guo8q0sDyZiRuxlfaopM454AKiELgU7l3tqsylCut6IBZ0fPy4ltSHsBib7M3yF7OEMoIuLwzWVg==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -3144,6 +3223,22 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@lavamoat/aa": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@lavamoat/aa/-/aa-4.3.1.tgz", + "integrity": "sha512-70KncU33sdupHww0+hDENxDv285PgYBuyPnX2CUkE7+qsuFNOI/m4vVChLM6RzquJmS1cxiL/bdnidznJOjd+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "1.22.8" + }, + "bin": { + "lavamoat-ls": "src/cli.js" + }, + "engines": { + "node": "^16.20.0 || ^18.0.0 || ^20.0.0 || ^22.0.0" + } + }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", @@ -3252,10 +3347,11 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" } @@ -3542,6 +3638,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -3571,6 +3668,16 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -4090,6 +4197,16 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.3.tgz", "integrity": "sha512-yuVFUvrNcoJi0sv5phmqc6P+Fl1HjRDRNOOkHY2X/3LBy2bIGNSFx4fZ95HMaXHupuS7cZR15AsvtmCIF4UEyg==" }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bitcore-lib": { "version": "8.25.10", "resolved": "https://registry.npmjs.org/bitcore-lib/-/bitcore-lib-8.25.10.tgz", @@ -4363,6 +4480,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -4684,6 +4802,23 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/corepack": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/corepack/-/corepack-0.30.0.tgz", + "integrity": "sha512-3SAVNBTaKpq9DPyM9m8dfrSRDF5B5TAs4obZWUtvsc1YnGF03IEJNo0dILPYcGpb3K+hcSWQsLKveGifX7hmLw==", + "dev": true, + "license": "MIT", + "bin": { + "corepack": "dist/corepack.js", + "pnpm": "dist/pnpm.js", + "pnpx": "dist/pnpx.js", + "yarn": "dist/yarn.js", + "yarnpkg": "dist/yarnpkg.js" + }, + "engines": { + "node": "^18.17.1 || >=20.10.0" + } + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -5206,8 +5341,9 @@ "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -6056,6 +6192,13 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT" + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6189,6 +6332,29 @@ "is-callable": "^1.1.3" } }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -6558,6 +6724,16 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -6897,6 +7073,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -8960,7 +9146,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -8976,15 +9163,16 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { @@ -8999,6 +9187,25 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/json-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -9017,6 +9224,16 @@ "node": ">=6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -9099,6 +9316,110 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "node_modules/lavamoat": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/lavamoat/-/lavamoat-9.0.7.tgz", + "integrity": "sha512-T0TmXK40aDfPd6haqHBfGh7Rz+1YwE8Dj0HLPMkHRxQZZ8+CPtD+QAhwg60bYxcDURE0s2kgUkiyJsiO0tGkHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "7.26.2", + "@babel/highlight": "7.25.9", + "@lavamoat/aa": "^4.3.1", + "bindings": "1.5.0", + "corepack": "0.30.0", + "htmlescape": "1.1.1", + "lavamoat-core": "^16.3.1", + "lavamoat-tofu": "^8.0.5", + "node-gyp-build": "4.8.4", + "resolve": "1.22.8", + "yargs": "17.7.2" + }, + "bin": { + "lavamoat": "src/cli.js", + "lavamoat-run-command": "src/run-command.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 <20.15.0 || ^20.17.0 || ^22.5.1" + } + }, + "node_modules/lavamoat-core": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/lavamoat-core/-/lavamoat-core-16.3.1.tgz", + "integrity": "sha512-7c/LI46fsxkrKN+5Y2I7mDZFExD8Ouo8WdIW6dVEAiwJeVf8F+rUNR9n1I4FN3x4JaXFcBTN9IJ0NHUHqzeXzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "7.26.5", + "json-stable-stringify": "1.1.1", + "lavamoat-tofu": "^8.0.5", + "merge-deep": "3.0.3", + "ses": "1.10.0", + "type-fest": "4.30.0" + }, + "bin": { + "lavamoat-sort-policy": "src/policy-sort-cli.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" + } + }, + "node_modules/lavamoat-core/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lavamoat-tofu": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lavamoat-tofu/-/lavamoat-tofu-8.0.5.tgz", + "integrity": "sha512-0WcCQh0fUpRKkGksBMHIk2PxjSfHxDYxXXsEyvjvJgDjW5Nl9UENlmRoYgHJ6te9HRXyJqCIzSMuHgx03e7+nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "7.26.5", + "@babel/traverse": "7.26.5", + "@babel/types": "7.26.5", + "@types/babel__traverse": "7.20.6", + "type-fest": "4.30.0" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" + }, + "peerDependencies": { + "lavamoat-core": ">15.4.0" + } + }, + "node_modules/lavamoat-tofu/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/level": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/level/-/level-8.0.1.tgz", @@ -9291,6 +9612,97 @@ "node": ">= 0.6" } }, + "node_modules/merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-deep/node_modules/clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha512-we+NuQo2DHhSl+DP6jlUiAhyAjBQrYnpOk15rN6c6JSPScjiCLh8IbSU+VTcph6YS3o7mASE8a0+gbZ7ChLpgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-deep/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge-deep/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-deep/node_modules/shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-deep/node_modules/shallow-clone/node_modules/kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha512-0u8i1NZ/mg0b+W3MGGw5I7+6Eib2nx72S/QvXa0hYjEkjTknYmEYQJwGu3mLC0BrhtJjtQafTkyRUQ75Kx0LVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-deep/node_modules/shallow-clone/node_modules/lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha512-gkX52wvU/R8DVMMt78ATVPFMJqfW8FPz1GZ1sVHBVQHmu/WvhIWE4cE1GBzhJNFicDeYhnwp6Rl35BcAIM3YOQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -9393,6 +9805,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-object/node_modules/for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha512-F0to7vbBSHP8E3l6dCjxNOLuSFAACIxFy3UehTUlG7svlXi37HHsDkyVcHo0Pq8QwrE+pXvWSVX3ZT1T9wAZ9g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mock-socket": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz", @@ -9465,9 +9901,10 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -10445,6 +10882,16 @@ "node": ">= 0.8.0" } }, + "node_modules/ses": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/ses/-/ses-1.10.0.tgz", + "integrity": "sha512-HXmJbNEgY/4hsQfaz5dna39vVKNyvlElRmJYk+bjTqSXSElT0Hr6NKwWVg4j0TxP6IuHp/PNMoWJKIRXzmLbAQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@endo/env-options": "^1.1.8" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -10933,15 +11380,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 61e2b738..fc457977 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ "axios": "1.7.7", "express": "4.18.2", "express-validator": "6.10.0", - "validator": "13.11.0", "jsonwebtoken": "9.0.2", "lodash": "4.17.21", "morgan": "1.10.0", "uuid4": "2.0.3", + "validator": "13.11.0", "winston": "3.12.0", "yargs": "17.7.2" }, @@ -66,9 +66,10 @@ "eslint-config-airbnb-base": "15.0.0", "eslint-plugin-import": "2.29.1", "jest": "29.7.0", + "lavamoat": "^9.0.7", "mock-socket": "9.3.1", "nodemon": "3.1.0", - "supertest": "7.0.0", - "superagent": "9.0.2" + "superagent": "9.0.2", + "supertest": "7.0.0" } } diff --git a/patches/@hathor+wallet-lib+2.0.1.patch b/patches/@hathor+wallet-lib+2.0.1.patch new file mode 100644 index 00000000..ea0c8b18 --- /dev/null +++ b/patches/@hathor+wallet-lib+2.0.1.patch @@ -0,0 +1,65 @@ +diff --git a/node_modules/@hathor/wallet-lib/lib/api/axiosWrapper.js b/node_modules/@hathor/wallet-lib/lib/api/axiosWrapper.js +index 4b13e8d..51b054c 100644 +--- a/node_modules/@hathor/wallet-lib/lib/api/axiosWrapper.js ++++ b/node_modules/@hathor/wallet-lib/lib/api/axiosWrapper.js +@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.axiosWrapperCreateRequestInstance = void 0; +-var _axios = _interopRequireDefault(require("axios")); ++var _axios = _interopRequireDefault(require("axios/dist/node/axios.cjs")); + var _constants = require("../constants"); + var _config = _interopRequireDefault(require("../config")); + function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +diff --git a/node_modules/@hathor/wallet-lib/lib/api/nano.js b/node_modules/@hathor/wallet-lib/lib/api/nano.js +index 04be165..39b5ae1 100644 +--- a/node_modules/@hathor/wallet-lib/lib/api/nano.js ++++ b/node_modules/@hathor/wallet-lib/lib/api/nano.js +@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +-var _axios = _interopRequireDefault(require("axios")); ++var _axios = _interopRequireDefault(require("axios/dist/node/axios.cjs")); + var _axiosInstance = require("./axiosInstance"); + var _errors = require("../errors"); + function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +diff --git a/node_modules/@hathor/wallet-lib/lib/utils/storage.js b/node_modules/@hathor/wallet-lib/lib/utils/storage.js +index 2ea66aa..23a332b 100644 +--- a/node_modules/@hathor/wallet-lib/lib/utils/storage.js ++++ b/node_modules/@hathor/wallet-lib/lib/utils/storage.js +@@ -17,7 +17,7 @@ exports.processNewTx = processNewTx; + exports.processUtxoUnlock = processUtxoUnlock; + exports.scanPolicyStartAddresses = scanPolicyStartAddresses; + var _lodash = require("lodash"); +-var _axios = _interopRequireDefault(require("axios")); ++var _axios = _interopRequireDefault(require("axios/dist/node/axios.cjs")); + var _types = require("../types"); + var _wallet = _interopRequireDefault(require("../api/wallet")); + var _helpers = _interopRequireDefault(require("./helpers")); +diff --git a/node_modules/@hathor/wallet-lib/lib/wallet/api/swapService.js b/node_modules/@hathor/wallet-lib/lib/wallet/api/swapService.js +index 5aff800..81b3ccf 100644 +--- a/node_modules/@hathor/wallet-lib/lib/wallet/api/swapService.js ++++ b/node_modules/@hathor/wallet-lib/lib/wallet/api/swapService.js +@@ -9,7 +9,7 @@ exports.encryptString = encryptString; + exports.get = void 0; + exports.hashPassword = hashPassword; + exports.update = void 0; +-var _axios = _interopRequireDefault(require("axios")); ++var _axios = _interopRequireDefault(require("axios/dist/node/axios.cjs")); + var _sha = _interopRequireDefault(require("crypto-js/sha256")); + var _aes = _interopRequireDefault(require("crypto-js/aes")); + var _cryptoJs = _interopRequireDefault(require("crypto-js")); +diff --git a/node_modules/@hathor/wallet-lib/lib/wallet/api/walletServiceAxios.js b/node_modules/@hathor/wallet-lib/lib/wallet/api/walletServiceAxios.js +index 266c2bf..6e24191 100644 +--- a/node_modules/@hathor/wallet-lib/lib/wallet/api/walletServiceAxios.js ++++ b/node_modules/@hathor/wallet-lib/lib/wallet/api/walletServiceAxios.js +@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.axiosInstance = void 0; +-var _axios = _interopRequireDefault(require("axios")); ++var _axios = _interopRequireDefault(require("axios/dist/node/axios.cjs")); + var _constants = require("../../constants"); + var _config = _interopRequireDefault(require("../../config")); + function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } diff --git a/patches/js-sha256+0.9.0.patch b/patches/js-sha256+0.9.0.patch new file mode 100644 index 00000000..e138d94a --- /dev/null +++ b/patches/js-sha256+0.9.0.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/js-sha256/src/sha256.js b/node_modules/js-sha256/src/sha256.js +index 14bcf45..80363ca 100644 +--- a/node_modules/js-sha256/src/sha256.js ++++ b/node_modules/js-sha256/src/sha256.js +@@ -80,8 +80,8 @@ + }; + + var nodeWrap = function (method, is224) { +- var crypto = eval("require('crypto')"); +- var Buffer = eval("require('buffer').Buffer"); ++ var crypto = require('crypto'); ++ var Buffer = require('buffer').Buffer; + var algorithm = is224 ? 'sha224' : 'sha256'; + var nodeMethod = function (message) { + if (typeof message === 'string') {