@nostrwatch/route66 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +346 -0
- package/adapters/cache/NostrSqliteAdapter/README.md +1 -0
- package/adapters/cache/NostrSqliteAdapter/build.js +64 -0
- package/adapters/cache/NostrSqliteAdapter/dist/browser/index.js +11789 -0
- package/adapters/cache/NostrSqliteAdapter/dist/browser/index.js.map +7 -0
- package/adapters/cache/NostrSqliteAdapter/dist/browser/workers/nostrsqlite.worker.js +9512 -0
- package/adapters/cache/NostrSqliteAdapter/dist/browser/workers/nostrsqlite.worker.js.map +7 -0
- package/adapters/cache/NostrSqliteAdapter/node_modules/.bin/esbuild +14 -0
- package/adapters/cache/NostrSqliteAdapter/node_modules/.bin/tsc +17 -0
- package/adapters/cache/NostrSqliteAdapter/node_modules/.bin/tsserver +17 -0
- package/adapters/cache/NostrSqliteAdapter/node_modules/.bin/vite +17 -0
- package/adapters/cache/NostrSqliteAdapter/package.json +49 -0
- package/adapters/cache/NostrSqliteAdapter/package.tgz +0 -0
- package/adapters/cache/NostrSqliteAdapter/src/NostrSqLiteMethods.ts +5 -0
- package/adapters/cache/NostrSqliteAdapter/src/NostrSqliteAdapter.ts +246 -0
- package/adapters/cache/NostrSqliteAdapter/src/NostrSqliteWorker.ts +113 -0
- package/adapters/cache/NostrSqliteAdapter/src/index.ts +1 -0
- package/adapters/cache/NostrSqliteAdapter/src/utils.ts +8 -0
- package/adapters/cache/NostrSqliteAdapter/src/workers/nostrsqlite.worker.ts +12 -0
- package/adapters/cache/NostrSqliteAdapter/tsconfig.json +26 -0
- package/adapters/websocket/NostrToolsAdapter/build.js +123 -0
- package/adapters/websocket/NostrToolsAdapter/dist/browser/index.js +1788 -0
- package/adapters/websocket/NostrToolsAdapter/dist/browser/index.js.map +7 -0
- package/adapters/websocket/NostrToolsAdapter/dist/node/index.js +1811 -0
- package/adapters/websocket/NostrToolsAdapter/dist/node/index.js.map +7 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/esbuild +14 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/eslint +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/jest +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/prettier +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/rollup +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/rollup-plugin-visualizer +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/tsc +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.bin/tsserver +17 -0
- package/adapters/websocket/NostrToolsAdapter/node_modules/.cache/esbuild-plugin-inline-worker/nostrtools.worker.js +141 -0
- package/adapters/websocket/NostrToolsAdapter/package.json +79 -0
- package/adapters/websocket/NostrToolsAdapter/src/NostrToolsAdapter.ts +17 -0
- package/adapters/websocket/NostrToolsAdapter/src/NostrToolsWorker.ts +405 -0
- package/adapters/websocket/NostrToolsAdapter/src/index.ts +3 -0
- package/adapters/websocket/NostrToolsAdapter/src/shims/empty.js +1 -0
- package/adapters/websocket/NostrToolsAdapter/src/shims/node-module-shim.js +3 -0
- package/adapters/websocket/NostrToolsAdapter/src/workers/nostrtools.worker.ts +12 -0
- package/adapters/websocket/NostrToolsAdapter/tsconfig.json +28 -0
- package/build.js +72 -0
- package/dist/browser/_virtual/_commonjsHelpers.amd.js +2 -0
- package/dist/browser/_virtual/_commonjsHelpers.amd.js.map +1 -0
- package/dist/browser/_virtual/_commonjsHelpers.esm.js +2 -0
- package/dist/browser/_virtual/_commonjsHelpers.esm.js.map +1 -0
- package/dist/browser/_virtual/_tslib.amd.js +2 -0
- package/dist/browser/_virtual/_tslib.amd.js.map +1 -0
- package/dist/browser/_virtual/_tslib.esm.js +2 -0
- package/dist/browser/_virtual/_tslib.esm.js.map +1 -0
- package/dist/browser/_virtual/bake-collection.amd.js +2 -0
- package/dist/browser/_virtual/bake-collection.amd.js.map +1 -0
- package/dist/browser/_virtual/bake-collection.esm.js +2 -0
- package/dist/browser/_virtual/bake-collection.esm.js.map +1 -0
- package/dist/browser/_virtual/bolt11.amd.js +2 -0
- package/dist/browser/_virtual/bolt11.amd.js.map +1 -0
- package/dist/browser/_virtual/bolt11.esm.js +2 -0
- package/dist/browser/_virtual/bolt11.esm.js.map +1 -0
- package/dist/browser/_virtual/ee.amd.js +2 -0
- package/dist/browser/_virtual/ee.amd.js.map +1 -0
- package/dist/browser/_virtual/ee.esm.js +2 -0
- package/dist/browser/_virtual/ee.esm.js.map +1 -0
- package/dist/browser/_virtual/index.amd.js +2 -0
- package/dist/browser/_virtual/index.amd.js.map +1 -0
- package/dist/browser/_virtual/index.amd2.js +2 -0
- package/dist/browser/_virtual/index.amd2.js.map +1 -0
- package/dist/browser/_virtual/index.amd3.js +2 -0
- package/dist/browser/_virtual/index.amd3.js.map +1 -0
- package/dist/browser/_virtual/index.amd4.js +2 -0
- package/dist/browser/_virtual/index.amd4.js.map +1 -0
- package/dist/browser/_virtual/index.amd5.js +2 -0
- package/dist/browser/_virtual/index.amd5.js.map +1 -0
- package/dist/browser/_virtual/index.amd6.js +2 -0
- package/dist/browser/_virtual/index.amd6.js.map +1 -0
- package/dist/browser/_virtual/index.esm.js +2 -0
- package/dist/browser/_virtual/index.esm.js.map +1 -0
- package/dist/browser/_virtual/index.esm2.js +2 -0
- package/dist/browser/_virtual/index.esm2.js.map +1 -0
- package/dist/browser/_virtual/index.esm3.js +2 -0
- package/dist/browser/_virtual/index.esm3.js.map +1 -0
- package/dist/browser/_virtual/index.esm4.js +2 -0
- package/dist/browser/_virtual/index.esm4.js.map +1 -0
- package/dist/browser/_virtual/index.esm5.js +2 -0
- package/dist/browser/_virtual/index.esm5.js.map +1 -0
- package/dist/browser/_virtual/index.esm6.js +2 -0
- package/dist/browser/_virtual/index.esm6.js.map +1 -0
- package/dist/browser/_virtual/task-collection.amd.js +2 -0
- package/dist/browser/_virtual/task-collection.amd.js.map +1 -0
- package/dist/browser/_virtual/task-collection.esm.js +2 -0
- package/dist/browser/_virtual/task-collection.esm.js.map +1 -0
- package/dist/browser/_virtual/types.amd.js +2 -0
- package/dist/browser/_virtual/types.amd.js.map +1 -0
- package/dist/browser/_virtual/types.esm.js +2 -0
- package/dist/browser/_virtual/types.esm.js.map +1 -0
- package/dist/browser/_virtual/utils.amd.js +2 -0
- package/dist/browser/_virtual/utils.amd.js.map +1 -0
- package/dist/browser/_virtual/utils.amd2.js +2 -0
- package/dist/browser/_virtual/utils.amd2.js.map +1 -0
- package/dist/browser/_virtual/utils.esm.js +2 -0
- package/dist/browser/_virtual/utils.esm.js.map +1 -0
- package/dist/browser/_virtual/utils.esm2.js +2 -0
- package/dist/browser/_virtual/utils.esm2.js.map +1 -0
- package/dist/browser/core/Adapter.amd.js +2 -0
- package/dist/browser/core/Adapter.amd.js.map +1 -0
- package/dist/browser/core/Adapter.esm.js +2 -0
- package/dist/browser/core/Adapter.esm.js.map +1 -0
- package/dist/browser/core/AdapterCacheWorker.amd.js +2 -0
- package/dist/browser/core/AdapterCacheWorker.amd.js.map +1 -0
- package/dist/browser/core/AdapterCacheWorker.esm.js +2 -0
- package/dist/browser/core/AdapterCacheWorker.esm.js.map +1 -0
- package/dist/browser/core/AdapterWebsocketWorker.amd.js +2 -0
- package/dist/browser/core/AdapterWebsocketWorker.amd.js.map +1 -0
- package/dist/browser/core/AdapterWebsocketWorker.esm.js +2 -0
- package/dist/browser/core/AdapterWebsocketWorker.esm.js.map +1 -0
- package/dist/browser/core/AdapterWorker.amd.js +2 -0
- package/dist/browser/core/AdapterWorker.amd.js.map +1 -0
- package/dist/browser/core/AdapterWorker.esm.js +2 -0
- package/dist/browser/core/AdapterWorker.esm.js.map +1 -0
- package/dist/browser/core/Base.amd.js +2 -0
- package/dist/browser/core/Base.amd.js.map +1 -0
- package/dist/browser/core/Base.esm.js +2 -0
- package/dist/browser/core/Base.esm.js.map +1 -0
- package/dist/browser/core/Batcher.amd.js +2 -0
- package/dist/browser/core/Batcher.amd.js.map +1 -0
- package/dist/browser/core/Batcher.esm.js +2 -0
- package/dist/browser/core/Batcher.esm.js.map +1 -0
- package/dist/browser/core/CacheAdapter.amd.js +2 -0
- package/dist/browser/core/CacheAdapter.amd.js.map +1 -0
- package/dist/browser/core/CacheAdapter.esm.js +2 -0
- package/dist/browser/core/CacheAdapter.esm.js.map +1 -0
- package/dist/browser/core/LocalStorageWrapper.amd.js +2 -0
- package/dist/browser/core/LocalStorageWrapper.amd.js.map +1 -0
- package/dist/browser/core/LocalStorageWrapper.esm.js +2 -0
- package/dist/browser/core/LocalStorageWrapper.esm.js.map +1 -0
- package/dist/browser/core/Queue.amd.js +2 -0
- package/dist/browser/core/Queue.amd.js.map +1 -0
- package/dist/browser/core/Queue.esm.js +2 -0
- package/dist/browser/core/Queue.esm.js.map +1 -0
- package/dist/browser/core/WebsocketAdapter.amd.js +2 -0
- package/dist/browser/core/WebsocketAdapter.amd.js.map +1 -0
- package/dist/browser/core/WebsocketAdapter.esm.js +2 -0
- package/dist/browser/core/WebsocketAdapter.esm.js.map +1 -0
- package/dist/browser/core/Workers.amd.js +2 -0
- package/dist/browser/core/Workers.amd.js.map +1 -0
- package/dist/browser/core/Workers.esm.js +2 -0
- package/dist/browser/core/Workers.esm.js.map +1 -0
- package/dist/browser/core/index.amd.js +71 -0
- package/dist/browser/core/index.amd.js.map +1 -0
- package/dist/browser/core/index.esm.js +2 -0
- package/dist/browser/core/index.esm.js.map +1 -0
- package/dist/browser/factory/cache.shared.worker.amd.js +2 -0
- package/dist/browser/factory/cache.shared.worker.amd.js.map +1 -0
- package/dist/browser/factory/cache.shared.worker.esm.js +2 -0
- package/dist/browser/factory/cache.shared.worker.esm.js.map +1 -0
- package/dist/browser/factory/cache.worker.amd.js +2 -0
- package/dist/browser/factory/cache.worker.amd.js.map +1 -0
- package/dist/browser/factory/cache.worker.esm.js +2 -0
- package/dist/browser/factory/cache.worker.esm.js.map +1 -0
- package/dist/browser/factory/index.amd.js +71 -0
- package/dist/browser/factory/index.amd.js.map +1 -0
- package/dist/browser/factory/index.esm.js +2 -0
- package/dist/browser/factory/index.esm.js.map +1 -0
- package/dist/browser/index.amd.js +71 -0
- package/dist/browser/index.amd.js.map +1 -0
- package/dist/browser/index.esm.js +2 -0
- package/dist/browser/index.esm.js.map +1 -0
- package/dist/browser/interfaces/index.amd.js +71 -0
- package/dist/browser/interfaces/index.amd.js.map +1 -0
- package/dist/browser/interfaces/index.esm.js +2 -0
- package/dist/browser/interfaces/index.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/_virtual/_tslib.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/_virtual/_tslib.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/_virtual/_tslib.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/_virtual/_tslib.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/config.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/config.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/config.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/config.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/controlflow.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/controlflow.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/controlflow.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/controlflow.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.amd.js +4 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.esm.js +4 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.amd.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.esm.js +3 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.esm.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.amd.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.amd.js.map +1 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.esm.js +2 -0
- package/dist/browser/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.esm.js.map +1 -0
- package/dist/browser/managers/MonitorManager.amd.js +2 -0
- package/dist/browser/managers/MonitorManager.amd.js.map +1 -0
- package/dist/browser/managers/MonitorManager.esm.js +2 -0
- package/dist/browser/managers/MonitorManager.esm.js.map +1 -0
- package/dist/browser/managers/StateManager.amd.js +2 -0
- package/dist/browser/managers/StateManager.amd.js.map +1 -0
- package/dist/browser/managers/StateManager.esm.js +2 -0
- package/dist/browser/managers/StateManager.esm.js.map +1 -0
- package/dist/browser/managers/SyncStateManager.amd.js +2 -0
- package/dist/browser/managers/SyncStateManager.amd.js.map +1 -0
- package/dist/browser/managers/SyncStateManager.esm.js +2 -0
- package/dist/browser/managers/SyncStateManager.esm.js.map +1 -0
- package/dist/browser/models/DeltaEvent.amd.js +2 -0
- package/dist/browser/models/DeltaEvent.amd.js.map +1 -0
- package/dist/browser/models/DeltaEvent.esm.js +2 -0
- package/dist/browser/models/DeltaEvent.esm.js.map +1 -0
- package/dist/browser/models/Event.amd.js +2 -0
- package/dist/browser/models/Event.amd.js.map +1 -0
- package/dist/browser/models/Event.esm.js +2 -0
- package/dist/browser/models/Event.esm.js.map +1 -0
- package/dist/browser/models/Geocoded.amd.js +2 -0
- package/dist/browser/models/Geocoded.amd.js.map +1 -0
- package/dist/browser/models/Geocoded.esm.js +2 -0
- package/dist/browser/models/Geocoded.esm.js.map +1 -0
- package/dist/browser/models/Monitor.amd.js +2 -0
- package/dist/browser/models/Monitor.amd.js.map +1 -0
- package/dist/browser/models/Monitor.esm.js +2 -0
- package/dist/browser/models/Monitor.esm.js.map +1 -0
- package/dist/browser/models/MonitorRegistration.amd.js +2 -0
- package/dist/browser/models/MonitorRegistration.amd.js.map +1 -0
- package/dist/browser/models/MonitorRegistration.esm.js +2 -0
- package/dist/browser/models/MonitorRegistration.esm.js.map +1 -0
- package/dist/browser/models/Nip11.amd.js +2 -0
- package/dist/browser/models/Nip11.amd.js.map +1 -0
- package/dist/browser/models/Nip11.esm.js +2 -0
- package/dist/browser/models/Nip11.esm.js.map +1 -0
- package/dist/browser/models/Nip66CheckEvent.amd.js +2 -0
- package/dist/browser/models/Nip66CheckEvent.amd.js.map +1 -0
- package/dist/browser/models/Nip66CheckEvent.esm.js +2 -0
- package/dist/browser/models/Nip66CheckEvent.esm.js.map +1 -0
- package/dist/browser/models/PubkeyProfile.amd.js +2 -0
- package/dist/browser/models/PubkeyProfile.amd.js.map +1 -0
- package/dist/browser/models/PubkeyProfile.esm.js +2 -0
- package/dist/browser/models/PubkeyProfile.esm.js.map +1 -0
- package/dist/browser/models/PubkeyRelays.amd.js +2 -0
- package/dist/browser/models/PubkeyRelays.amd.js.map +1 -0
- package/dist/browser/models/PubkeyRelays.esm.js +2 -0
- package/dist/browser/models/PubkeyRelays.esm.js.map +1 -0
- package/dist/browser/models/RelayCheckAggregate.amd.js +2 -0
- package/dist/browser/models/RelayCheckAggregate.amd.js.map +1 -0
- package/dist/browser/models/RelayCheckAggregate.esm.js +2 -0
- package/dist/browser/models/RelayCheckAggregate.esm.js.map +1 -0
- package/dist/browser/models/_.amd.js +2 -0
- package/dist/browser/models/_.amd.js.map +1 -0
- package/dist/browser/models/_.esm.js +2 -0
- package/dist/browser/models/_.esm.js.map +1 -0
- package/dist/browser/models/index.amd.js +71 -0
- package/dist/browser/models/index.amd.js.map +1 -0
- package/dist/browser/models/index.esm.js +2 -0
- package/dist/browser/models/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.esm.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.amd.js +3 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.js +3 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.amd.js +4 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.esm.js +4 -0
- package/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.esm.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.amd.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.amd.js.map +1 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.esm.js +2 -0
- package/dist/browser/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.esm.js.map +1 -0
- package/dist/browser/services/AuditorService.amd.js +2 -0
- package/dist/browser/services/AuditorService.amd.js.map +1 -0
- package/dist/browser/services/AuditorService.esm.js +2 -0
- package/dist/browser/services/AuditorService.esm.js.map +1 -0
- package/dist/browser/services/ChronicleService.amd.js +2 -0
- package/dist/browser/services/ChronicleService.amd.js.map +1 -0
- package/dist/browser/services/ChronicleService.esm.js +2 -0
- package/dist/browser/services/ChronicleService.esm.js.map +1 -0
- package/dist/browser/services/MonitorService.amd.js +2 -0
- package/dist/browser/services/MonitorService.amd.js.map +1 -0
- package/dist/browser/services/MonitorService.esm.js +2 -0
- package/dist/browser/services/MonitorService.esm.js.map +1 -0
- package/dist/browser/services/RelayService.amd.js +2 -0
- package/dist/browser/services/RelayService.amd.js.map +1 -0
- package/dist/browser/services/RelayService.esm.js +2 -0
- package/dist/browser/services/RelayService.esm.js.map +1 -0
- package/dist/browser/services/Service.amd.js +2 -0
- package/dist/browser/services/Service.amd.js.map +1 -0
- package/dist/browser/services/Service.esm.js +2 -0
- package/dist/browser/services/Service.esm.js.map +1 -0
- package/dist/browser/services/index.amd.js +71 -0
- package/dist/browser/services/index.amd.js.map +1 -0
- package/dist/browser/services/index.esm.js +2 -0
- package/dist/browser/services/index.esm.js.map +1 -0
- package/dist/browser/transform/TransformCheck.amd.js +2 -0
- package/dist/browser/transform/TransformCheck.amd.js.map +1 -0
- package/dist/browser/transform/TransformCheck.esm.js +2 -0
- package/dist/browser/transform/TransformCheck.esm.js.map +1 -0
- package/dist/browser/transform/TransformEvent.amd.js +2 -0
- package/dist/browser/transform/TransformEvent.amd.js.map +1 -0
- package/dist/browser/transform/TransformEvent.esm.js +2 -0
- package/dist/browser/transform/TransformEvent.esm.js.map +1 -0
- package/dist/browser/transform/TransformMonitors.amd.js +2 -0
- package/dist/browser/transform/TransformMonitors.amd.js.map +1 -0
- package/dist/browser/transform/TransformMonitors.esm.js +2 -0
- package/dist/browser/transform/TransformMonitors.esm.js.map +1 -0
- package/dist/browser/transform/TransformRelays.amd.js +2 -0
- package/dist/browser/transform/TransformRelays.amd.js.map +1 -0
- package/dist/browser/transform/TransformRelays.esm.js +2 -0
- package/dist/browser/transform/TransformRelays.esm.js.map +1 -0
- package/dist/browser/transform/index.amd.js +71 -0
- package/dist/browser/transform/index.amd.js.map +1 -0
- package/dist/browser/transform/index.esm.js +2 -0
- package/dist/browser/transform/index.esm.js.map +1 -0
- package/dist/browser/utils/SyncKeys.amd.js +2 -0
- package/dist/browser/utils/SyncKeys.amd.js.map +1 -0
- package/dist/browser/utils/SyncKeys.esm.js +2 -0
- package/dist/browser/utils/SyncKeys.esm.js.map +1 -0
- package/dist/browser/utils/classes.amd.js +2 -0
- package/dist/browser/utils/classes.amd.js.map +1 -0
- package/dist/browser/utils/classes.esm.js +2 -0
- package/dist/browser/utils/classes.esm.js.map +1 -0
- package/dist/browser/utils/encoding.amd.js +2 -0
- package/dist/browser/utils/encoding.amd.js.map +1 -0
- package/dist/browser/utils/encoding.esm.js +2 -0
- package/dist/browser/utils/encoding.esm.js.map +1 -0
- package/dist/browser/utils/events.amd.js +2 -0
- package/dist/browser/utils/events.amd.js.map +1 -0
- package/dist/browser/utils/events.esm.js +2 -0
- package/dist/browser/utils/events.esm.js.map +1 -0
- package/dist/browser/utils/general.amd.js +2 -0
- package/dist/browser/utils/general.amd.js.map +1 -0
- package/dist/browser/utils/general.esm.js +2 -0
- package/dist/browser/utils/general.esm.js.map +1 -0
- package/dist/browser/utils/geo.amd.js +2 -0
- package/dist/browser/utils/geo.amd.js.map +1 -0
- package/dist/browser/utils/geo.esm.js +2 -0
- package/dist/browser/utils/geo.esm.js.map +1 -0
- package/dist/browser/utils/hash.amd.js +2 -0
- package/dist/browser/utils/hash.amd.js.map +1 -0
- package/dist/browser/utils/hash.esm.js +2 -0
- package/dist/browser/utils/hash.esm.js.map +1 -0
- package/dist/browser/utils/index.amd.js +71 -0
- package/dist/browser/utils/index.amd.js.map +1 -0
- package/dist/browser/utils/index.esm.js +2 -0
- package/dist/browser/utils/index.esm.js.map +1 -0
- package/dist/browser/utils/monitors.amd.js +2 -0
- package/dist/browser/utils/monitors.amd.js.map +1 -0
- package/dist/browser/utils/monitors.esm.js +2 -0
- package/dist/browser/utils/monitors.esm.js.map +1 -0
- package/dist/browser/utils/nostr.amd.js +2 -0
- package/dist/browser/utils/nostr.amd.js.map +1 -0
- package/dist/browser/utils/nostr.esm.js +2 -0
- package/dist/browser/utils/nostr.esm.js.map +1 -0
- package/dist/browser/utils/pfp.amd.js +2 -0
- package/dist/browser/utils/pfp.amd.js.map +1 -0
- package/dist/browser/utils/pfp.esm.js +2 -0
- package/dist/browser/utils/pfp.esm.js.map +1 -0
- package/dist/node/core/Adapter.js +205 -0
- package/dist/node/core/Adapter.js.map +1 -0
- package/dist/node/core/AdapterCacheWorker.js +170 -0
- package/dist/node/core/AdapterCacheWorker.js.map +1 -0
- package/dist/node/core/AdapterWebsocketQueue.js +27 -0
- package/dist/node/core/AdapterWebsocketQueue.js.map +1 -0
- package/dist/node/core/AdapterWebsocketWorker.js +374 -0
- package/dist/node/core/AdapterWebsocketWorker.js.map +1 -0
- package/dist/node/core/AdapterWorker.js +250 -0
- package/dist/node/core/AdapterWorker.js.map +1 -0
- package/dist/node/core/Base.js +359 -0
- package/dist/node/core/Base.js.map +1 -0
- package/dist/node/core/Batcher.js +63 -0
- package/dist/node/core/Batcher.js.map +1 -0
- package/dist/node/core/CacheAdapter.js +113 -0
- package/dist/node/core/CacheAdapter.js.map +1 -0
- package/dist/node/core/Checkpoints.js +52 -0
- package/dist/node/core/Checkpoints.js.map +1 -0
- package/dist/node/core/LocalStorageWrapper.js +109 -0
- package/dist/node/core/LocalStorageWrapper.js.map +1 -0
- package/dist/node/core/Loggerr.js +3 -0
- package/dist/node/core/Loggerr.js.map +1 -0
- package/dist/node/core/Memory.js +19 -0
- package/dist/node/core/Memory.js.map +1 -0
- package/dist/node/core/Queue.js +158 -0
- package/dist/node/core/Queue.js.map +1 -0
- package/dist/node/core/Routine.js +7 -0
- package/dist/node/core/Routine.js.map +1 -0
- package/dist/node/core/Subscriber.js +75 -0
- package/dist/node/core/Subscriber.js.map +1 -0
- package/dist/node/core/WebsocketAdapter.js +488 -0
- package/dist/node/core/WebsocketAdapter.js.map +1 -0
- package/dist/node/core/Workers.js +172 -0
- package/dist/node/core/Workers.js.map +1 -0
- package/dist/node/core/index.js +12 -0
- package/dist/node/core/index.js.map +1 -0
- package/dist/node/factory/cache.shared.worker.js +58 -0
- package/dist/node/factory/cache.shared.worker.js.map +1 -0
- package/dist/node/factory/cache.worker.js +4 -0
- package/dist/node/factory/cache.worker.js.map +1 -0
- package/dist/node/factory/index.js +3 -0
- package/dist/node/factory/index.js.map +1 -0
- package/dist/node/helpers/filters.js +7 -0
- package/dist/node/helpers/filters.js.map +1 -0
- package/dist/node/index.js +10 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/interfaces/IAdapterWorkerCommand.js +2 -0
- package/dist/node/interfaces/IAdapterWorkerCommand.js.map +1 -0
- package/dist/node/interfaces/IAdaptersArgument.js +2 -0
- package/dist/node/interfaces/IAdaptersArgument.js.map +1 -0
- package/dist/node/interfaces/ICacheAdapter.js +37 -0
- package/dist/node/interfaces/ICacheAdapter.js.map +1 -0
- package/dist/node/interfaces/ICacheAdapterSharedWorkerCommand.js +2 -0
- package/dist/node/interfaces/ICacheAdapterSharedWorkerCommand.js.map +1 -0
- package/dist/node/interfaces/INostrEvent.js +2 -0
- package/dist/node/interfaces/INostrEvent.js.map +1 -0
- package/dist/node/interfaces/ISharedWorkerGlobalScope.js +2 -0
- package/dist/node/interfaces/ISharedWorkerGlobalScope.js.map +1 -0
- package/dist/node/interfaces/IWorkerCommand.js +2 -0
- package/dist/node/interfaces/IWorkerCommand.js.map +1 -0
- package/dist/node/interfaces/IWorkerGlobalScope.js +2 -0
- package/dist/node/interfaces/IWorkerGlobalScope.js.map +1 -0
- package/dist/node/interfaces/TISO13166.js +2 -0
- package/dist/node/interfaces/TISO13166.js.map +1 -0
- package/dist/node/interfaces/index.js +2 -0
- package/dist/node/interfaces/index.js.map +1 -0
- package/dist/node/managers/MonitorManager.js +251 -0
- package/dist/node/managers/MonitorManager.js.map +1 -0
- package/dist/node/managers/StageManager.js +86 -0
- package/dist/node/managers/StageManager.js.map +1 -0
- package/dist/node/managers/StateManager.js +173 -0
- package/dist/node/managers/StateManager.js.map +1 -0
- package/dist/node/managers/SyncStateManager.js +56 -0
- package/dist/node/managers/SyncStateManager.js.map +1 -0
- package/dist/node/models/Check.js +2 -0
- package/dist/node/models/Check.js.map +1 -0
- package/dist/node/models/DeltaEvent.js +198 -0
- package/dist/node/models/DeltaEvent.js.map +1 -0
- package/dist/node/models/Event.js +209 -0
- package/dist/node/models/Event.js.map +1 -0
- package/dist/node/models/EventEncoded.js +2 -0
- package/dist/node/models/EventEncoded.js.map +1 -0
- package/dist/node/models/Geocode.js +2 -0
- package/dist/node/models/Geocode.js.map +1 -0
- package/dist/node/models/Geocoded.js +608 -0
- package/dist/node/models/Geocoded.js.map +1 -0
- package/dist/node/models/Geohash.js +2 -0
- package/dist/node/models/Geohash.js.map +1 -0
- package/dist/node/models/Monitor.js +493 -0
- package/dist/node/models/Monitor.js.map +1 -0
- package/dist/node/models/MonitorRegistration.js +54 -0
- package/dist/node/models/MonitorRegistration.js.map +1 -0
- package/dist/node/models/Nip11.js +352 -0
- package/dist/node/models/Nip11.js.map +1 -0
- package/dist/node/models/Nip66CheckEvent.js +532 -0
- package/dist/node/models/Nip66CheckEvent.js.map +1 -0
- package/dist/node/models/PubkeyProfile.js +121 -0
- package/dist/node/models/PubkeyProfile.js.map +1 -0
- package/dist/node/models/PubkeyRelays.js +32 -0
- package/dist/node/models/PubkeyRelays.js.map +1 -0
- package/dist/node/models/Relay.js +2 -0
- package/dist/node/models/Relay.js.map +1 -0
- package/dist/node/models/RelayCheckAggregate.js +220 -0
- package/dist/node/models/RelayCheckAggregate.js.map +1 -0
- package/dist/node/models/Ssl.js +2 -0
- package/dist/node/models/Ssl.js.map +1 -0
- package/dist/node/models/_.js +8 -0
- package/dist/node/models/_.js.map +1 -0
- package/dist/node/models/index.js +11 -0
- package/dist/node/models/index.js.map +1 -0
- package/dist/node/routines/PurgeInactiveMonitors.js +68 -0
- package/dist/node/routines/PurgeInactiveMonitors.js.map +1 -0
- package/dist/node/routines/PurgeOldChecks.js +68 -0
- package/dist/node/routines/PurgeOldChecks.js.map +1 -0
- package/dist/node/services/AuditorService.js +25 -0
- package/dist/node/services/AuditorService.js.map +1 -0
- package/dist/node/services/ChronicleService.js +788 -0
- package/dist/node/services/ChronicleService.js.map +1 -0
- package/dist/node/services/MonitorService.js +1020 -0
- package/dist/node/services/MonitorService.js.map +1 -0
- package/dist/node/services/RelayService.js +391 -0
- package/dist/node/services/RelayService.js.map +1 -0
- package/dist/node/services/Service.js +533 -0
- package/dist/node/services/Service.js.map +1 -0
- package/dist/node/services/index.js +6 -0
- package/dist/node/services/index.js.map +1 -0
- package/dist/node/transform/TransformCheck.js +51 -0
- package/dist/node/transform/TransformCheck.js.map +1 -0
- package/dist/node/transform/TransformEvent.js +33 -0
- package/dist/node/transform/TransformEvent.js.map +1 -0
- package/dist/node/transform/TransformMonitors.js +129 -0
- package/dist/node/transform/TransformMonitors.js.map +1 -0
- package/dist/node/transform/TransformRelays.js +339 -0
- package/dist/node/transform/TransformRelays.js.map +1 -0
- package/dist/node/transform/index.js +4 -0
- package/dist/node/transform/index.js.map +1 -0
- package/dist/node/utils/SyncKeys.js +17 -0
- package/dist/node/utils/SyncKeys.js.map +1 -0
- package/dist/node/utils/classes.js +41 -0
- package/dist/node/utils/classes.js.map +1 -0
- package/dist/node/utils/encoding.js +59 -0
- package/dist/node/utils/encoding.js.map +1 -0
- package/dist/node/utils/events.js +26 -0
- package/dist/node/utils/events.js.map +1 -0
- package/dist/node/utils/general.js +142 -0
- package/dist/node/utils/general.js.map +1 -0
- package/dist/node/utils/geo.js +14 -0
- package/dist/node/utils/geo.js.map +1 -0
- package/dist/node/utils/hash.js +103 -0
- package/dist/node/utils/hash.js.map +1 -0
- package/dist/node/utils/index.js +8 -0
- package/dist/node/utils/index.js.map +1 -0
- package/dist/node/utils/monitors.js +3 -0
- package/dist/node/utils/monitors.js.map +1 -0
- package/dist/node/utils/nostr.js +38 -0
- package/dist/node/utils/nostr.js.map +1 -0
- package/dist/node/utils/pfp.js +231 -0
- package/dist/node/utils/pfp.js.map +1 -0
- package/dist/node/workers/nocap.worker.js +2 -0
- package/dist/node/workers/nocap.worker.js.map +1 -0
- package/dist/server/_virtual/_commonjsHelpers.cjs.js +2 -0
- package/dist/server/_virtual/_commonjsHelpers.cjs.js.map +1 -0
- package/dist/server/_virtual/_commonjsHelpers.esm.js +2 -0
- package/dist/server/_virtual/_commonjsHelpers.esm.js.map +1 -0
- package/dist/server/_virtual/_tslib.cjs.js +2 -0
- package/dist/server/_virtual/_tslib.cjs.js.map +1 -0
- package/dist/server/_virtual/_tslib.esm.js +2 -0
- package/dist/server/_virtual/_tslib.esm.js.map +1 -0
- package/dist/server/_virtual/bake-collection.cjs.js +2 -0
- package/dist/server/_virtual/bake-collection.cjs.js.map +1 -0
- package/dist/server/_virtual/bake-collection.esm.js +2 -0
- package/dist/server/_virtual/bake-collection.esm.js.map +1 -0
- package/dist/server/_virtual/bolt11.cjs.js +2 -0
- package/dist/server/_virtual/bolt11.cjs.js.map +1 -0
- package/dist/server/_virtual/bolt11.esm.js +2 -0
- package/dist/server/_virtual/bolt11.esm.js.map +1 -0
- package/dist/server/_virtual/ee.cjs.js +2 -0
- package/dist/server/_virtual/ee.cjs.js.map +1 -0
- package/dist/server/_virtual/ee.esm.js +2 -0
- package/dist/server/_virtual/ee.esm.js.map +1 -0
- package/dist/server/_virtual/index.cjs.js +2 -0
- package/dist/server/_virtual/index.cjs.js.map +1 -0
- package/dist/server/_virtual/index.cjs2.js +2 -0
- package/dist/server/_virtual/index.cjs2.js.map +1 -0
- package/dist/server/_virtual/index.cjs3.js +2 -0
- package/dist/server/_virtual/index.cjs3.js.map +1 -0
- package/dist/server/_virtual/index.cjs4.js +2 -0
- package/dist/server/_virtual/index.cjs4.js.map +1 -0
- package/dist/server/_virtual/index.cjs5.js +2 -0
- package/dist/server/_virtual/index.cjs5.js.map +1 -0
- package/dist/server/_virtual/index.cjs6.js +2 -0
- package/dist/server/_virtual/index.cjs6.js.map +1 -0
- package/dist/server/_virtual/index.esm.js +2 -0
- package/dist/server/_virtual/index.esm.js.map +1 -0
- package/dist/server/_virtual/index.esm2.js +2 -0
- package/dist/server/_virtual/index.esm2.js.map +1 -0
- package/dist/server/_virtual/index.esm3.js +2 -0
- package/dist/server/_virtual/index.esm3.js.map +1 -0
- package/dist/server/_virtual/index.esm4.js +2 -0
- package/dist/server/_virtual/index.esm4.js.map +1 -0
- package/dist/server/_virtual/index.esm5.js +2 -0
- package/dist/server/_virtual/index.esm5.js.map +1 -0
- package/dist/server/_virtual/index.esm6.js +2 -0
- package/dist/server/_virtual/index.esm6.js.map +1 -0
- package/dist/server/_virtual/task-collection.cjs.js +2 -0
- package/dist/server/_virtual/task-collection.cjs.js.map +1 -0
- package/dist/server/_virtual/task-collection.esm.js +2 -0
- package/dist/server/_virtual/task-collection.esm.js.map +1 -0
- package/dist/server/_virtual/types.cjs.js +2 -0
- package/dist/server/_virtual/types.cjs.js.map +1 -0
- package/dist/server/_virtual/types.esm.js +2 -0
- package/dist/server/_virtual/types.esm.js.map +1 -0
- package/dist/server/_virtual/utils.cjs.js +2 -0
- package/dist/server/_virtual/utils.cjs.js.map +1 -0
- package/dist/server/_virtual/utils.cjs2.js +2 -0
- package/dist/server/_virtual/utils.cjs2.js.map +1 -0
- package/dist/server/_virtual/utils.esm.js +2 -0
- package/dist/server/_virtual/utils.esm.js.map +1 -0
- package/dist/server/_virtual/utils.esm2.js +2 -0
- package/dist/server/_virtual/utils.esm2.js.map +1 -0
- package/dist/server/core/Adapter.cjs.js +2 -0
- package/dist/server/core/Adapter.cjs.js.map +1 -0
- package/dist/server/core/Adapter.esm.js +2 -0
- package/dist/server/core/Adapter.esm.js.map +1 -0
- package/dist/server/core/AdapterCacheWorker.cjs.js +2 -0
- package/dist/server/core/AdapterCacheWorker.cjs.js.map +1 -0
- package/dist/server/core/AdapterCacheWorker.esm.js +2 -0
- package/dist/server/core/AdapterCacheWorker.esm.js.map +1 -0
- package/dist/server/core/AdapterWebsocketWorker.cjs.js +2 -0
- package/dist/server/core/AdapterWebsocketWorker.cjs.js.map +1 -0
- package/dist/server/core/AdapterWebsocketWorker.esm.js +2 -0
- package/dist/server/core/AdapterWebsocketWorker.esm.js.map +1 -0
- package/dist/server/core/AdapterWorker.cjs.js +2 -0
- package/dist/server/core/AdapterWorker.cjs.js.map +1 -0
- package/dist/server/core/AdapterWorker.esm.js +2 -0
- package/dist/server/core/AdapterWorker.esm.js.map +1 -0
- package/dist/server/core/Base.cjs.js +2 -0
- package/dist/server/core/Base.cjs.js.map +1 -0
- package/dist/server/core/Base.esm.js +2 -0
- package/dist/server/core/Base.esm.js.map +1 -0
- package/dist/server/core/Batcher.cjs.js +2 -0
- package/dist/server/core/Batcher.cjs.js.map +1 -0
- package/dist/server/core/Batcher.esm.js +2 -0
- package/dist/server/core/Batcher.esm.js.map +1 -0
- package/dist/server/core/CacheAdapter.cjs.js +2 -0
- package/dist/server/core/CacheAdapter.cjs.js.map +1 -0
- package/dist/server/core/CacheAdapter.esm.js +2 -0
- package/dist/server/core/CacheAdapter.esm.js.map +1 -0
- package/dist/server/core/LocalStorageWrapper.cjs.js +2 -0
- package/dist/server/core/LocalStorageWrapper.cjs.js.map +1 -0
- package/dist/server/core/LocalStorageWrapper.esm.js +2 -0
- package/dist/server/core/LocalStorageWrapper.esm.js.map +1 -0
- package/dist/server/core/Queue.cjs.js +2 -0
- package/dist/server/core/Queue.cjs.js.map +1 -0
- package/dist/server/core/Queue.esm.js +2 -0
- package/dist/server/core/Queue.esm.js.map +1 -0
- package/dist/server/core/WebsocketAdapter.cjs.js +2 -0
- package/dist/server/core/WebsocketAdapter.cjs.js.map +1 -0
- package/dist/server/core/WebsocketAdapter.esm.js +2 -0
- package/dist/server/core/WebsocketAdapter.esm.js.map +1 -0
- package/dist/server/core/Workers.cjs.js +2 -0
- package/dist/server/core/Workers.cjs.js.map +1 -0
- package/dist/server/core/Workers.esm.js +2 -0
- package/dist/server/core/Workers.esm.js.map +1 -0
- package/dist/server/core/index.cjs.js +2 -0
- package/dist/server/core/index.cjs.js.map +1 -0
- package/dist/server/core/index.esm.js +2 -0
- package/dist/server/core/index.esm.js.map +1 -0
- package/dist/server/factory/cache.shared.worker.cjs.js +2 -0
- package/dist/server/factory/cache.shared.worker.cjs.js.map +1 -0
- package/dist/server/factory/cache.shared.worker.esm.js +2 -0
- package/dist/server/factory/cache.shared.worker.esm.js.map +1 -0
- package/dist/server/factory/cache.worker.cjs.js +2 -0
- package/dist/server/factory/cache.worker.cjs.js.map +1 -0
- package/dist/server/factory/cache.worker.esm.js +2 -0
- package/dist/server/factory/cache.worker.esm.js.map +1 -0
- package/dist/server/factory/index.cjs.js +2 -0
- package/dist/server/factory/index.cjs.js.map +1 -0
- package/dist/server/factory/index.esm.js +2 -0
- package/dist/server/factory/index.esm.js.map +1 -0
- package/dist/server/index.cjs.js +2 -0
- package/dist/server/index.cjs.js.map +1 -0
- package/dist/server/index.esm.js +2 -0
- package/dist/server/index.esm.js.map +1 -0
- package/dist/server/interfaces/index.cjs.js +2 -0
- package/dist/server/interfaces/index.cjs.js.map +1 -0
- package/dist/server/interfaces/index.esm.js +2 -0
- package/dist/server/interfaces/index.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/_virtual/_tslib.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/_virtual/_tslib.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/_virtual/_tslib.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/_virtual/_tslib.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/config.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/config.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/config.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/config.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/controlflow.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/controlflow.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/controlflow.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/controlflow.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.cjs.js +4 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.cjs.js +4 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.cjs.js +4 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.esm.js +4 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.cjs.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.esm.js +3 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/nip19.esm.esm.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.cjs.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.cjs.js.map +1 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.esm.js +2 -0
- package/dist/server/internal/utils/dist/browser/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/pure.esm.esm.js.map +1 -0
- package/dist/server/managers/MonitorManager.cjs.js +2 -0
- package/dist/server/managers/MonitorManager.cjs.js.map +1 -0
- package/dist/server/managers/MonitorManager.esm.js +2 -0
- package/dist/server/managers/MonitorManager.esm.js.map +1 -0
- package/dist/server/managers/StateManager.cjs.js +2 -0
- package/dist/server/managers/StateManager.cjs.js.map +1 -0
- package/dist/server/managers/StateManager.esm.js +2 -0
- package/dist/server/managers/StateManager.esm.js.map +1 -0
- package/dist/server/managers/SyncStateManager.cjs.js +2 -0
- package/dist/server/managers/SyncStateManager.cjs.js.map +1 -0
- package/dist/server/managers/SyncStateManager.esm.js +2 -0
- package/dist/server/managers/SyncStateManager.esm.js.map +1 -0
- package/dist/server/models/DeltaEvent.cjs.js +2 -0
- package/dist/server/models/DeltaEvent.cjs.js.map +1 -0
- package/dist/server/models/DeltaEvent.esm.js +2 -0
- package/dist/server/models/DeltaEvent.esm.js.map +1 -0
- package/dist/server/models/Event.cjs.js +2 -0
- package/dist/server/models/Event.cjs.js.map +1 -0
- package/dist/server/models/Event.esm.js +2 -0
- package/dist/server/models/Event.esm.js.map +1 -0
- package/dist/server/models/Geocoded.cjs.js +2 -0
- package/dist/server/models/Geocoded.cjs.js.map +1 -0
- package/dist/server/models/Geocoded.esm.js +2 -0
- package/dist/server/models/Geocoded.esm.js.map +1 -0
- package/dist/server/models/Monitor.cjs.js +2 -0
- package/dist/server/models/Monitor.cjs.js.map +1 -0
- package/dist/server/models/Monitor.esm.js +2 -0
- package/dist/server/models/Monitor.esm.js.map +1 -0
- package/dist/server/models/MonitorRegistration.cjs.js +2 -0
- package/dist/server/models/MonitorRegistration.cjs.js.map +1 -0
- package/dist/server/models/MonitorRegistration.esm.js +2 -0
- package/dist/server/models/MonitorRegistration.esm.js.map +1 -0
- package/dist/server/models/Nip11.cjs.js +2 -0
- package/dist/server/models/Nip11.cjs.js.map +1 -0
- package/dist/server/models/Nip11.esm.js +2 -0
- package/dist/server/models/Nip11.esm.js.map +1 -0
- package/dist/server/models/Nip66CheckEvent.cjs.js +2 -0
- package/dist/server/models/Nip66CheckEvent.cjs.js.map +1 -0
- package/dist/server/models/Nip66CheckEvent.esm.js +2 -0
- package/dist/server/models/Nip66CheckEvent.esm.js.map +1 -0
- package/dist/server/models/PubkeyProfile.cjs.js +2 -0
- package/dist/server/models/PubkeyProfile.cjs.js.map +1 -0
- package/dist/server/models/PubkeyProfile.esm.js +2 -0
- package/dist/server/models/PubkeyProfile.esm.js.map +1 -0
- package/dist/server/models/PubkeyRelays.cjs.js +2 -0
- package/dist/server/models/PubkeyRelays.cjs.js.map +1 -0
- package/dist/server/models/PubkeyRelays.esm.js +2 -0
- package/dist/server/models/PubkeyRelays.esm.js.map +1 -0
- package/dist/server/models/RelayCheckAggregate.cjs.js +2 -0
- package/dist/server/models/RelayCheckAggregate.cjs.js.map +1 -0
- package/dist/server/models/RelayCheckAggregate.esm.js +2 -0
- package/dist/server/models/RelayCheckAggregate.esm.js.map +1 -0
- package/dist/server/models/_.cjs.js +2 -0
- package/dist/server/models/_.cjs.js.map +1 -0
- package/dist/server/models/_.esm.js +2 -0
- package/dist/server/models/_.esm.js.map +1 -0
- package/dist/server/models/index.cjs.js +2 -0
- package/dist/server/models/index.cjs.js.map +1 -0
- package/dist/server/models/index.esm.js +2 -0
- package/dist/server/models/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_arx.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/_assert.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/aes.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/chacha.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.esm.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_ciphers@0.5.3/node_modules/@noble/ciphers/esm/utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.cjs.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.cjs.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.cjs.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.1/node_modules/@noble/hashes/esm/utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.cjs.js +3 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.js +3 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/esm/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.cjs.js +4 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.esm.js +4 -0
- package/dist/server/node_modules/.pnpm/@scure_base@1.1.1/node_modules/@scure/base/lib/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/jsurl2@2.2.0/node_modules/jsurl2/dist/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/light-bolt11-decoder@3.2.0/node_modules/light-bolt11-decoder/bolt11.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/nostr-tools@2.11.0_typescript@5.8.3/node_modules/nostr-tools/lib/esm/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/p-timeout@6.1.4/node_modules/p-timeout/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/ee.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/bake-collection.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/index.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/task-collection.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/task-collection/utils.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/types.esm.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.cjs.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.cjs.js.map +1 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.esm.js +2 -0
- package/dist/server/node_modules/.pnpm/tseep@1.3.1/node_modules/tseep/lib/utils.esm.js.map +1 -0
- package/dist/server/services/AuditorService.cjs.js +2 -0
- package/dist/server/services/AuditorService.cjs.js.map +1 -0
- package/dist/server/services/AuditorService.esm.js +2 -0
- package/dist/server/services/AuditorService.esm.js.map +1 -0
- package/dist/server/services/ChronicleService.cjs.js +2 -0
- package/dist/server/services/ChronicleService.cjs.js.map +1 -0
- package/dist/server/services/ChronicleService.esm.js +2 -0
- package/dist/server/services/ChronicleService.esm.js.map +1 -0
- package/dist/server/services/MonitorService.cjs.js +2 -0
- package/dist/server/services/MonitorService.cjs.js.map +1 -0
- package/dist/server/services/MonitorService.esm.js +2 -0
- package/dist/server/services/MonitorService.esm.js.map +1 -0
- package/dist/server/services/RelayService.cjs.js +2 -0
- package/dist/server/services/RelayService.cjs.js.map +1 -0
- package/dist/server/services/RelayService.esm.js +2 -0
- package/dist/server/services/RelayService.esm.js.map +1 -0
- package/dist/server/services/Service.cjs.js +2 -0
- package/dist/server/services/Service.cjs.js.map +1 -0
- package/dist/server/services/Service.esm.js +2 -0
- package/dist/server/services/Service.esm.js.map +1 -0
- package/dist/server/services/index.cjs.js +2 -0
- package/dist/server/services/index.cjs.js.map +1 -0
- package/dist/server/services/index.esm.js +2 -0
- package/dist/server/services/index.esm.js.map +1 -0
- package/dist/server/transform/TransformCheck.cjs.js +2 -0
- package/dist/server/transform/TransformCheck.cjs.js.map +1 -0
- package/dist/server/transform/TransformCheck.esm.js +2 -0
- package/dist/server/transform/TransformCheck.esm.js.map +1 -0
- package/dist/server/transform/TransformEvent.cjs.js +2 -0
- package/dist/server/transform/TransformEvent.cjs.js.map +1 -0
- package/dist/server/transform/TransformEvent.esm.js +2 -0
- package/dist/server/transform/TransformEvent.esm.js.map +1 -0
- package/dist/server/transform/TransformMonitors.cjs.js +2 -0
- package/dist/server/transform/TransformMonitors.cjs.js.map +1 -0
- package/dist/server/transform/TransformMonitors.esm.js +2 -0
- package/dist/server/transform/TransformMonitors.esm.js.map +1 -0
- package/dist/server/transform/TransformRelays.cjs.js +2 -0
- package/dist/server/transform/TransformRelays.cjs.js.map +1 -0
- package/dist/server/transform/TransformRelays.esm.js +2 -0
- package/dist/server/transform/TransformRelays.esm.js.map +1 -0
- package/dist/server/transform/index.cjs.js +2 -0
- package/dist/server/transform/index.cjs.js.map +1 -0
- package/dist/server/transform/index.esm.js +2 -0
- package/dist/server/transform/index.esm.js.map +1 -0
- package/dist/server/utils/SyncKeys.cjs.js +2 -0
- package/dist/server/utils/SyncKeys.cjs.js.map +1 -0
- package/dist/server/utils/SyncKeys.esm.js +2 -0
- package/dist/server/utils/SyncKeys.esm.js.map +1 -0
- package/dist/server/utils/classes.cjs.js +2 -0
- package/dist/server/utils/classes.cjs.js.map +1 -0
- package/dist/server/utils/classes.esm.js +2 -0
- package/dist/server/utils/classes.esm.js.map +1 -0
- package/dist/server/utils/encoding.cjs.js +2 -0
- package/dist/server/utils/encoding.cjs.js.map +1 -0
- package/dist/server/utils/encoding.esm.js +2 -0
- package/dist/server/utils/encoding.esm.js.map +1 -0
- package/dist/server/utils/events.cjs.js +2 -0
- package/dist/server/utils/events.cjs.js.map +1 -0
- package/dist/server/utils/events.esm.js +2 -0
- package/dist/server/utils/events.esm.js.map +1 -0
- package/dist/server/utils/general.cjs.js +2 -0
- package/dist/server/utils/general.cjs.js.map +1 -0
- package/dist/server/utils/general.esm.js +2 -0
- package/dist/server/utils/general.esm.js.map +1 -0
- package/dist/server/utils/geo.cjs.js +2 -0
- package/dist/server/utils/geo.cjs.js.map +1 -0
- package/dist/server/utils/geo.esm.js +2 -0
- package/dist/server/utils/geo.esm.js.map +1 -0
- package/dist/server/utils/hash.cjs.js +2 -0
- package/dist/server/utils/hash.cjs.js.map +1 -0
- package/dist/server/utils/hash.esm.js +2 -0
- package/dist/server/utils/hash.esm.js.map +1 -0
- package/dist/server/utils/index.cjs.js +2 -0
- package/dist/server/utils/index.cjs.js.map +1 -0
- package/dist/server/utils/index.esm.js +2 -0
- package/dist/server/utils/index.esm.js.map +1 -0
- package/dist/server/utils/monitors.cjs.js +2 -0
- package/dist/server/utils/monitors.cjs.js.map +1 -0
- package/dist/server/utils/monitors.esm.js +2 -0
- package/dist/server/utils/monitors.esm.js.map +1 -0
- package/dist/server/utils/nostr.cjs.js +2 -0
- package/dist/server/utils/nostr.cjs.js.map +1 -0
- package/dist/server/utils/nostr.esm.js +2 -0
- package/dist/server/utils/nostr.esm.js.map +1 -0
- package/dist/server/utils/pfp.cjs.js +2 -0
- package/dist/server/utils/pfp.cjs.js.map +1 -0
- package/dist/server/utils/pfp.esm.js +2 -0
- package/dist/server/utils/pfp.esm.js.map +1 -0
- package/dist/types/core/Adapter.d.ts +58 -0
- package/dist/types/core/Adapter.d.ts.map +1 -0
- package/dist/types/core/AdapterCacheWorker.d.ts +28 -0
- package/dist/types/core/AdapterCacheWorker.d.ts.map +1 -0
- package/dist/types/core/AdapterWebsocketQueue.d.ts +7 -0
- package/dist/types/core/AdapterWebsocketQueue.d.ts.map +1 -0
- package/dist/types/core/AdapterWebsocketWorker.d.ts +78 -0
- package/dist/types/core/AdapterWebsocketWorker.d.ts.map +1 -0
- package/dist/types/core/AdapterWorker.d.ts +55 -0
- package/dist/types/core/AdapterWorker.d.ts.map +1 -0
- package/dist/types/core/Base.d.ts +53 -0
- package/dist/types/core/Base.d.ts.map +1 -0
- package/dist/types/core/Batcher.d.ts +19 -0
- package/dist/types/core/Batcher.d.ts.map +1 -0
- package/dist/types/core/CacheAdapter.d.ts +127 -0
- package/dist/types/core/CacheAdapter.d.ts.map +1 -0
- package/dist/types/core/Checkpoints.d.ts +8 -0
- package/dist/types/core/Checkpoints.d.ts.map +1 -0
- package/dist/types/core/LocalStorageWrapper.d.ts +19 -0
- package/dist/types/core/LocalStorageWrapper.d.ts.map +1 -0
- package/dist/types/core/Loggerr.d.ts +3 -0
- package/dist/types/core/Loggerr.d.ts.map +1 -0
- package/dist/types/core/Memory.d.ts +1 -0
- package/dist/types/core/Memory.d.ts.map +1 -0
- package/dist/types/core/Queue.d.ts +42 -0
- package/dist/types/core/Queue.d.ts.map +1 -0
- package/dist/types/core/Routine.d.ts +3 -0
- package/dist/types/core/Routine.d.ts.map +1 -0
- package/dist/types/core/Subscriber.d.ts +10 -0
- package/dist/types/core/Subscriber.d.ts.map +1 -0
- package/dist/types/core/WebsocketAdapter.d.ts +93 -0
- package/dist/types/core/WebsocketAdapter.d.ts.map +1 -0
- package/dist/types/core/Workers.d.ts +24 -0
- package/dist/types/core/Workers.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +12 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/factory/cache.shared.worker.d.ts +3 -0
- package/dist/types/factory/cache.shared.worker.d.ts.map +1 -0
- package/dist/types/factory/cache.worker.d.ts +11 -0
- package/dist/types/factory/cache.worker.d.ts.map +1 -0
- package/dist/types/factory/index.d.ts +3 -0
- package/dist/types/factory/index.d.ts.map +1 -0
- package/dist/types/helpers/filters.d.ts +4 -0
- package/dist/types/helpers/filters.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interfaces/IAdapterWorkerCommand.d.ts +8 -0
- package/dist/types/interfaces/IAdapterWorkerCommand.d.ts.map +1 -0
- package/dist/types/interfaces/IAdaptersArgument.d.ts +7 -0
- package/dist/types/interfaces/IAdaptersArgument.d.ts.map +1 -0
- package/dist/types/interfaces/ICacheAdapter.d.ts +1 -0
- package/dist/types/interfaces/ICacheAdapter.d.ts.map +1 -0
- package/dist/types/interfaces/ICacheAdapterSharedWorkerCommand.d.ts +8 -0
- package/dist/types/interfaces/ICacheAdapterSharedWorkerCommand.d.ts.map +1 -0
- package/dist/types/interfaces/INostrEvent.d.ts +2 -0
- package/dist/types/interfaces/INostrEvent.d.ts.map +1 -0
- package/dist/types/interfaces/ISharedWorkerGlobalScope.d.ts +7 -0
- package/dist/types/interfaces/ISharedWorkerGlobalScope.d.ts.map +1 -0
- package/dist/types/interfaces/IWorkerCommand.d.ts +6 -0
- package/dist/types/interfaces/IWorkerCommand.d.ts.map +1 -0
- package/dist/types/interfaces/IWorkerGlobalScope.d.ts +7 -0
- package/dist/types/interfaces/IWorkerGlobalScope.d.ts.map +1 -0
- package/dist/types/interfaces/TISO13166.d.ts +15 -0
- package/dist/types/interfaces/TISO13166.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +8 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/managers/MonitorManager.d.ts +50 -0
- package/dist/types/managers/MonitorManager.d.ts.map +1 -0
- package/dist/types/managers/StageManager.d.ts +36 -0
- package/dist/types/managers/StageManager.d.ts.map +1 -0
- package/dist/types/managers/StateManager.d.ts +50 -0
- package/dist/types/managers/StateManager.d.ts.map +1 -0
- package/dist/types/managers/SyncStateManager.d.ts +22 -0
- package/dist/types/managers/SyncStateManager.d.ts.map +1 -0
- package/dist/types/models/Check.d.ts +28 -0
- package/dist/types/models/Check.d.ts.map +1 -0
- package/dist/types/models/DeltaEvent.d.ts +79 -0
- package/dist/types/models/DeltaEvent.d.ts.map +1 -0
- package/dist/types/models/Event.d.ts +61 -0
- package/dist/types/models/Event.d.ts.map +1 -0
- package/dist/types/models/EventEncoded.d.ts +8 -0
- package/dist/types/models/EventEncoded.d.ts.map +1 -0
- package/dist/types/models/Geocode.d.ts +7 -0
- package/dist/types/models/Geocode.d.ts.map +1 -0
- package/dist/types/models/Geocoded.d.ts +238 -0
- package/dist/types/models/Geocoded.d.ts.map +1 -0
- package/dist/types/models/Geohash.d.ts +6 -0
- package/dist/types/models/Geohash.d.ts.map +1 -0
- package/dist/types/models/Monitor.d.ts +96 -0
- package/dist/types/models/Monitor.d.ts.map +1 -0
- package/dist/types/models/MonitorRegistration.d.ts +8 -0
- package/dist/types/models/MonitorRegistration.d.ts.map +1 -0
- package/dist/types/models/Nip11.d.ts +155 -0
- package/dist/types/models/Nip11.d.ts.map +1 -0
- package/dist/types/models/Nip66CheckEvent.d.ts +63 -0
- package/dist/types/models/Nip66CheckEvent.d.ts.map +1 -0
- package/dist/types/models/PubkeyProfile.d.ts +19 -0
- package/dist/types/models/PubkeyProfile.d.ts.map +1 -0
- package/dist/types/models/PubkeyRelays.d.ts +5 -0
- package/dist/types/models/PubkeyRelays.d.ts.map +1 -0
- package/dist/types/models/Relay.d.ts +9 -0
- package/dist/types/models/Relay.d.ts.map +1 -0
- package/dist/types/models/RelayCheckAggregate.d.ts +92 -0
- package/dist/types/models/RelayCheckAggregate.d.ts.map +1 -0
- package/dist/types/models/Ssl.d.ts +9 -0
- package/dist/types/models/Ssl.d.ts.map +1 -0
- package/dist/types/models/_.d.ts +2 -0
- package/dist/types/models/_.d.ts.map +1 -0
- package/dist/types/models/index.d.ts +15 -0
- package/dist/types/models/index.d.ts.map +1 -0
- package/dist/types/routines/PurgeInactiveMonitors.d.ts +6 -0
- package/dist/types/routines/PurgeInactiveMonitors.d.ts.map +1 -0
- package/dist/types/routines/PurgeOldChecks.d.ts +6 -0
- package/dist/types/routines/PurgeOldChecks.d.ts.map +1 -0
- package/dist/types/services/AuditorService.d.ts +4 -0
- package/dist/types/services/AuditorService.d.ts.map +1 -0
- package/dist/types/services/ChronicleService.d.ts +177 -0
- package/dist/types/services/ChronicleService.d.ts.map +1 -0
- package/dist/types/services/MonitorService.d.ts +62 -0
- package/dist/types/services/MonitorService.d.ts.map +1 -0
- package/dist/types/services/RelayService.d.ts +39 -0
- package/dist/types/services/RelayService.d.ts.map +1 -0
- package/dist/types/services/Service.d.ts +56 -0
- package/dist/types/services/Service.d.ts.map +1 -0
- package/dist/types/services/index.d.ts +6 -0
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/transform/TransformCheck.d.ts +24 -0
- package/dist/types/transform/TransformCheck.d.ts.map +1 -0
- package/dist/types/transform/TransformEvent.d.ts +4 -0
- package/dist/types/transform/TransformEvent.d.ts.map +1 -0
- package/dist/types/transform/TransformMonitors.d.ts +10 -0
- package/dist/types/transform/TransformMonitors.d.ts.map +1 -0
- package/dist/types/transform/TransformRelays.d.ts +20 -0
- package/dist/types/transform/TransformRelays.d.ts.map +1 -0
- package/dist/types/transform/index.d.ts +4 -0
- package/dist/types/transform/index.d.ts.map +1 -0
- package/dist/types/utils/SyncKeys.d.ts +12 -0
- package/dist/types/utils/SyncKeys.d.ts.map +1 -0
- package/dist/types/utils/classes.d.ts +21 -0
- package/dist/types/utils/classes.d.ts.map +1 -0
- package/dist/types/utils/encoding.d.ts +4 -0
- package/dist/types/utils/encoding.d.ts.map +1 -0
- package/dist/types/utils/events.d.ts +7 -0
- package/dist/types/utils/events.d.ts.map +1 -0
- package/dist/types/utils/general.d.ts +8 -0
- package/dist/types/utils/general.d.ts.map +1 -0
- package/dist/types/utils/geo.d.ts +5 -0
- package/dist/types/utils/geo.d.ts.map +1 -0
- package/dist/types/utils/hash.d.ts +7 -0
- package/dist/types/utils/hash.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/monitors.d.ts +2 -0
- package/dist/types/utils/monitors.d.ts.map +1 -0
- package/dist/types/utils/nostr.d.ts +9 -0
- package/dist/types/utils/nostr.d.ts.map +1 -0
- package/dist/types/utils/pfp.d.ts +17 -0
- package/dist/types/utils/pfp.d.ts.map +1 -0
- package/dist/types/workers/nocap.worker.d.ts +2 -0
- package/dist/types/workers/nocap.worker.d.ts.map +1 -0
- package/examples/basic.js +14 -0
- package/package.json +133 -0
- package/rollup.config.js +206 -0
- package/src/core/Adapter.ts +182 -0
- package/src/core/AdapterCacheWorker.ts +83 -0
- package/src/core/AdapterWebsocketQueue.ts +20 -0
- package/src/core/AdapterWebsocketWorker.ts +307 -0
- package/src/core/AdapterWorker.ts +200 -0
- package/src/core/Base.ts +212 -0
- package/src/core/Batcher.ts +78 -0
- package/src/core/CacheAdapter.ts +186 -0
- package/src/core/Checkpoints.ts +11 -0
- package/src/core/LocalStorageWrapper.ts +112 -0
- package/src/core/Loggerr.ts +3 -0
- package/src/core/Memory.ts +20 -0
- package/src/core/Queue.ts +109 -0
- package/src/core/Routine.ts +1 -0
- package/src/core/Subscriber.ts +29 -0
- package/src/core/WebsocketAdapter.ts +438 -0
- package/src/core/Workers.ts +115 -0
- package/src/core/index.ts +15 -0
- package/src/factory/cache.shared.worker.ts +14 -0
- package/src/factory/cache.worker.ts +13 -0
- package/src/factory/index.ts +2 -0
- package/src/helpers/filters.ts +9 -0
- package/src/index.ts +13 -0
- package/src/interfaces/IAdapterWorkerCommand.ts +8 -0
- package/src/interfaces/IAdaptersArgument.ts +7 -0
- package/src/interfaces/ICacheAdapter.ts +42 -0
- package/src/interfaces/ICacheAdapterSharedWorkerCommand.ts +8 -0
- package/src/interfaces/INostrEvent.ts +1 -0
- package/src/interfaces/ISharedWorkerGlobalScope.ts +6 -0
- package/src/interfaces/IWorkerCommand.ts +5 -0
- package/src/interfaces/IWorkerGlobalScope.ts +6 -0
- package/src/interfaces/TISO13166.ts +17 -0
- package/src/interfaces/index.ts +7 -0
- package/src/managers/MonitorManager.ts +232 -0
- package/src/managers/StageManager.ts +83 -0
- package/src/managers/StateManager.ts +176 -0
- package/src/managers/SyncStateManager.ts +60 -0
- package/src/models/Check.ts +34 -0
- package/src/models/DeltaEvent.ts +152 -0
- package/src/models/Event.ts +192 -0
- package/src/models/EventEncoded.ts +7 -0
- package/src/models/Geocode.ts +7 -0
- package/src/models/Geocoded.ts +567 -0
- package/src/models/Geohash.ts +6 -0
- package/src/models/Monitor.ts +384 -0
- package/src/models/MonitorRegistration.ts +25 -0
- package/src/models/Nip11.ts +275 -0
- package/src/models/Nip66CheckEvent.ts +316 -0
- package/src/models/PubkeyProfile.ts +67 -0
- package/src/models/PubkeyRelays.ts +9 -0
- package/src/models/Relay.ts +8 -0
- package/src/models/RelayCheckAggregate.ts +222 -0
- package/src/models/Ssl.ts +8 -0
- package/src/models/_.ts +7 -0
- package/src/models/index.ts +14 -0
- package/src/routines/PurgeInactiveMonitors.ts +10 -0
- package/src/routines/PurgeOldChecks.ts +10 -0
- package/src/services/AuditorService.ts +3 -0
- package/src/services/ChronicleService.ts +722 -0
- package/src/services/MonitorService.ts +719 -0
- package/src/services/RelayService.ts +250 -0
- package/src/services/Service.ts +370 -0
- package/src/services/index.ts +5 -0
- package/src/transform/TransformCheck.ts +62 -0
- package/src/transform/TransformEvent.ts +26 -0
- package/src/transform/TransformMonitors.ts +91 -0
- package/src/transform/TransformRelays.ts +327 -0
- package/src/transform/index.ts +3 -0
- package/src/utils/SyncKeys.ts +12 -0
- package/src/utils/classes.ts +48 -0
- package/src/utils/encoding.ts +16 -0
- package/src/utils/events.ts +29 -0
- package/src/utils/general.ts +101 -0
- package/src/utils/geo.ts +19 -0
- package/src/utils/hash.ts +98 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/monitors.ts +4 -0
- package/src/utils/nostr.ts +45 -0
- package/src/utils/pfp.ts +278 -0
- package/src/workers/nocap.worker.ts +1 -0
- package/tsconfig.browser.json +12 -0
- package/tsconfig.json +35 -0
- package/tsconfig.server.json +10 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weierstrass.esm.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.js"],"sourcesContent":["/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map"],"names":["bytesToNumberBE","b2n","hexToBytes","h2b","ut","DER","Err","DERErr","Error","constructor","m","super","_parseInt","data","E","length","len","res","subarray","d","l","toSig","hex","Uint8Array","r","sBytes","s","rBytesLeft","hexFromSig","sig","slice","Number","parseInt","h","num","toString","shl","rhl","sl","rl","_0n","BigInt","_1n","_3n","weierstrassPoints","opts","CURVE","validatePointOpts","curve","validateBasic","ut.validateObject","a","b","allowedPrivateKeyLengths","wrapPrivateKey","isTorsionFree","clearCofactor","allowInfinityPoint","fromBytes","toBytes","endo","Fp","eql","ZERO","beta","splitScalar","Object","freeze","_c","point","_isCompressed","toAffine","ut.concatBytes","from","x","y","bytes","tail","BYTES","weierstrassEquation","x2","sqr","x3","mul","add","Gy","Gx","isWithinCurveOrder","n","assertGE","normPrivateKeyToScalar","key","lengths","nByteLength","ut.bytesToHex","includes","padStart","ut.bytesToNumberBE","ensureBytes","error","mod.mod","pointPrecomputes","Map","assertPrjPoint","other","Point","px","py","pz","this","isValid","fromAffine","p","is0","i","ONE","normalizeZ","points","toInv","invertBatch","map","fromHex","P","assertValidity","fromPrivateKey","privateKey","BASE","multiply","_setWindowSize","windowSize","_WINDOW_SIZE","delete","left","right","hasEvenY","isOdd","equals","X1","Y1","Z1","X2","Y2","Z2","U1","U2","negate","neg","double","b3","X3","Y3","Z3","t0","t1","t2","t3","sub","t4","t5","subtract","wNAF","wnaf","wNAFCached","comp","multiplyUnsafe","I","unsafeLadder","k1neg","k1","k2neg","k2","k1p","k2p","scalar","fake","f","f1p","f2p","constTimeNegate","multiplyAndAddUnsafe","Q","G","sum","undefined","iz","z","inv","ax","ay","zz","cofactor","toRawBytes","isCompressed","toHex","_bits","nBitLength","Math","ceil","ProjectivePoint","weierstrass","curveDef","validateOpts","hash","hmac","randomBytes","bits2int","bits2int_modN","lowS","CURVE_ORDER","compressedLen","uncompressedLen","modN","invN","mod.invert","cat","head","isValidFieldElement","ORDER","y2","sqrt","numToNByteStr","ut.numberToBytesBE","isBiggerThanHalfOrder","number","slcNum","to","Signature","recovery","fromCompact","fromDER","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","prefix","R","ir","u1","u2","hasHighS","normalizeS","toDERRawBytes","ut.hexToBytes","toDERHex","toCompactRawBytes","toCompactHex","utils","isValidPrivateKey","randomPrivateKey","mod.getMinHashLength","mod.mapHashToField","precompute","isProbPub","item","arr","str","delta","ORDER_MASK","ut.bitMask","int2octets","prepSig","defaultSigOpts","some","k","prehash","extraEntropy","ent","h1int","seedArgs","e","push","seed","k2sig","kBytes","ik","q","normS","defaultVerOpts","getPublicKey","getSharedSecret","privateA","publicB","sign","privKey","C","ut.createHmacDrbg","outputLen","drbg","verify","signature","publicKey","sg","_sig","derError","message","is"],"mappings":"oXAkCA,MAAQA,gBAAiBC,EAAKC,WAAYC,GAAQC,EACrCC,EAAM,CAEfC,IAAK,MAAMC,eAAeC,MACtB,WAAAC,CAAYC,EAAI,IACZC,MAAMD,EACV,GAEJ,SAAAE,CAAUC,GACN,MAAQP,IAAKQ,GAAMT,EACnB,GAAIQ,EAAKE,OAAS,GAAiB,IAAZF,EAAK,GACxB,MAAM,IAAIC,EAAE,iCAChB,MAAME,EAAMH,EAAK,GACXI,EAAMJ,EAAKK,SAAS,EAAGF,EAAM,GACnC,IAAKA,GAAOC,EAAIF,SAAWC,EACvB,MAAM,IAAIF,EAAE,2CAKhB,GAAa,IAATG,EAAI,GACJ,MAAM,IAAIH,EAAE,uCAChB,GAAe,IAAXG,EAAI,MAA0B,IAATA,EAAI,IACzB,MAAM,IAAIH,EAAE,uDAChB,MAAO,CAAEK,EAAGlB,EAAIgB,GAAMG,EAAGP,EAAKK,SAASF,EAAM,GACjD,EACA,KAAAK,CAAMC,GAEF,MAAQhB,IAAKQ,GAAMT,EACbQ,EAAsB,iBAARS,EAAmBnB,EAAImB,GAAOA,EAClD,KAAMT,aAAgBU,YAClB,MAAM,IAAIf,MAAM,iBACpB,IAAIY,EAAIP,EAAKE,OACb,GAAIK,EAAI,GAAgB,IAAXP,EAAK,GACd,MAAM,IAAIC,EAAE,yBAChB,GAAID,EAAK,KAAOO,EAAI,EAChB,MAAM,IAAIN,EAAE,uCAChB,MAAQK,EAAGK,EAAGJ,EAAGK,GAAWpB,EAAIO,UAAUC,EAAKK,SAAS,KAChDC,EAAGO,EAAGN,EAAGO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AClBgE,EAAKpF,KAAK1L,GACVoN,EAAK3B,KAAKlL,EAAIuQ,GACdzD,EAAK5B,KAAK3L,EAAIgR,GACd5D,EAAInI,EAAMqB,KAAKqD,qBAAqBzD,EAAGoH,EAAIC,IAAKxK,WACtD,QAAKqK,GAEKzB,KAAKyB,EAAElK,KACJlD,CACjB,EAOI8K,gBAAiB7F,EACjByH,oBACRqB,MAAQA,EAER,CAr0BgF9M,OAAO","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";var e=require("../../../../../@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.cjs.js"),t=require("../../../../../@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.cjs.js"),r=require("./abstract/modular.cjs.js"),n=require("./abstract/utils.cjs.js"),f=require("./_shortw_utils.cjs.js");
|
|
2
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3
|
+
const s=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),o=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),i=BigInt(1),a=BigInt(2),divNearest=(e,t)=>(e+t/a)/t;function sqrtMod(e){const t=s,n=BigInt(3),f=BigInt(6),o=BigInt(11),i=BigInt(22),u=BigInt(23),d=BigInt(44),g=BigInt(88),b=e*e*e%t,l=b*b*e%t,y=r.pow2(l,n,t)*l%t,B=r.pow2(y,n,t)*l%t,h=r.pow2(B,a,t)*b%t,m=r.pow2(h,o,t)*h%t,w=r.pow2(m,i,t)*m%t,I=r.pow2(w,d,t)*w%t,p=r.pow2(I,g,t)*I%t,E=r.pow2(p,d,t)*w%t,x=r.pow2(E,n,t)*l%t,P=r.pow2(x,u,t)*m%t,v=r.pow2(P,f,t)*b%t,T=r.pow2(v,a,t);if(!c.eql(c.sqr(T),e))throw new Error("Cannot find square root");return T}const c=r.Field(s,void 0,void 0,{sqrt:sqrtMod}),u=f.createCurve({a:BigInt(0),b:BigInt(7),Fp:c,n:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=o,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),f=-i*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,c=BigInt("0x100000000000000000000000000000000"),u=divNearest(a*e,t),d=divNearest(-f*e,t);let g=r.mod(e-u*n-d*s,t),b=r.mod(-u*f-d*a,t);const l=g>c,y=b>c;if(l&&(g=t-g),y&&(b=t-b),g>c||b>c)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:g,k2neg:y,k2:b}}}},e.sha256),d=BigInt(0),fe=e=>"bigint"==typeof e&&d<e&&e<s,g={};function taggedHash(t,...r){let f=g[t];if(void 0===f){const r=e.sha256(Uint8Array.from(t,(e=>e.charCodeAt(0))));f=n.concatBytes(r,r),g[t]=f}return e.sha256(n.concatBytes(f,...r))}const pointToBytes=e=>e.toRawBytes(!0).slice(1),numTo32b=e=>n.numberToBytesBE(e,32),modP=e=>r.mod(e,s),modN=e=>r.mod(e,o),b=u.ProjectivePoint;function schnorrGetExtPubKey(e){let t=u.utils.normPrivateKeyToScalar(e),r=b.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:modN(-t),bytes:pointToBytes(r)}}function lift_x(e){if(!fe(e))throw new Error("bad x: need 0 < x < p");const t=modP(e*e);let r=sqrtMod(modP(t*e+BigInt(7)));r%a!==d&&(r=modP(-r));const n=new b(e,r,i);return n.assertValidity(),n}function challenge(...e){return modN(n.bytesToNumberBE(taggedHash("BIP0340/challenge",...e)))}function schnorrGetPublicKey(e){return schnorrGetExtPubKey(e).bytes}function schnorrSign(e,r,f=t.randomBytes(32)){const s=n.ensureBytes("message",e),{bytes:o,scalar:i}=schnorrGetExtPubKey(r),a=n.ensureBytes("auxRand",f,32),c=numTo32b(i^n.bytesToNumberBE(taggedHash("BIP0340/aux",a))),u=taggedHash("BIP0340/nonce",c,o,s),g=modN(n.bytesToNumberBE(u));if(g===d)throw new Error("sign failed: k is zero");const{bytes:b,scalar:l}=schnorrGetExtPubKey(g),y=challenge(b,o,s),B=new Uint8Array(64);if(B.set(b,0),B.set(numTo32b(modN(l+y*i)),32),!schnorrVerify(B,s,o))throw new Error("sign: Invalid signature produced");return B}function schnorrVerify(e,t,r){const f=n.ensureBytes("signature",e,64),s=n.ensureBytes("message",t),i=n.ensureBytes("publicKey",r,32);try{const e=lift_x(n.bytesToNumberBE(i)),t=n.bytesToNumberBE(f.subarray(0,32));if(!fe(t))return!1;const r=n.bytesToNumberBE(f.subarray(32,64));if(!("bigint"==typeof(g=r)&&d<g&&g<o))return!1;const l=challenge(numTo32b(t),pointToBytes(e),s),y=(a=e,c=r,u=modN(-l),b.BASE.multiplyAndAddUnsafe(a,c,u));return!(!y||!y.hasEvenY()||y.toAffine().x!==t)}catch(e){return!1}var a,c,u,g}const l=(()=>({getPublicKey:schnorrGetPublicKey,sign:schnorrSign,verify:schnorrVerify,utils:{randomPrivateKey:u.utils.randomPrivateKey,lift_x:lift_x,pointToBytes:pointToBytes,numberToBytesBE:n.numberToBytesBE,bytesToNumberBE:n.bytesToNumberBE,taggedHash:taggedHash,mod:r.mod}}))();exports.schnorr=l,exports.secp256k1=u;
|
|
4
|
+
//# sourceMappingURL=secp256k1.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secp256k1.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.js"],"sourcesContent":["/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map"],"names":["secp256k1P","BigInt","secp256k1N","_1n","_2n","divNearest","a","b","sqrtMod","y","P","_3n","_6n","_11n","_22n","_23n","_44n","_88n","b2","b3","b6","pow2","b9","b11","b22","b44","b88","b176","b220","b223","t1","t2","root","Fp","eql","sqr","Error","Field","undefined","sqrt","secp256k1","createCurve","n","Gx","Gy","h","lowS","endo","beta","splitScalar","k","a1","b1","a2","POW_2_128","c1","c2","k1","mod","k2","k1neg","k2neg","sha256","_0n","fe","x","TAGGED_HASH_PREFIXES","taggedHash","tag","messages","tagP","tagH","Uint8Array","from","c","charCodeAt","concatBytes","pointToBytes","point","toRawBytes","slice","numTo32b","numberToBytesBE","modP","modN","Point","ProjectivePoint","schnorrGetExtPubKey","priv","d_","utils","normPrivateKeyToScalar","p","fromPrivateKey","scalar","hasEvenY","bytes","lift_x","xx","assertValidity","challenge","args","bytesToNumberBE","schnorrGetPublicKey","privateKey","schnorrSign","message","auxRand","randomBytes","m","ensureBytes","px","d","t","rand","k_","rx","e","sig","set","schnorrVerify","signature","publicKey","pub","r","subarray","s","R","Q","BASE","multiplyAndAddUnsafe","toAffine","error","schnorr","getPublicKey","sign","verify","randomPrivateKey"],"mappings":";;AAQA,MAAMA,EAAaC,OAAO,sEACpBC,EAAaD,OAAO,sEACpBE,EAAMF,OAAO,GACbG,EAAMH,OAAO,GACbI,WAAa,CAACC,EAAGC,KAAOD,EAAIC,EAAIH,GAAOG,EAK7C,SAASC,QAAQC,GACb,MAAMC,EAAIV,EAEJW,EAAMV,OAAO,GAAIW,EAAMX,OAAO,GAAIY,EAAOZ,OAAO,IAAKa,EAAOb,OAAO,IAEnEc,EAAOd,OAAO,IAAKe,EAAOf,OAAO,IAAKgB,EAAOhB,OAAO,IACpDiB,EAAMT,EAAIA,EAAIA,EAAKC,EACnBS,EAAMD,EAAKA,EAAKT,EAAKC,EACrBU,EAAMC,OAAKF,EAAIR,EAAKD,GAAKS,EAAMT,EAC/BY,EAAMD,OAAKD,EAAIT,EAAKD,GAAKS,EAAMT,EAC/Ba,EAAOF,OAAKC,EAAIlB,EAAKM,GAAKQ,EAAMR,EAChCc,EAAOH,OAAKE,EAAKV,EAAMH,GAAKa,EAAOb,EACnCe,EAAOJ,OAAKG,EAAKV,EAAMJ,GAAKc,EAAOd,EACnCgB,EAAOL,OAAKI,EAAKT,EAAMN,GAAKe,EAAOf,EACnCiB,EAAQN,OAAKK,EAAKT,EAAMP,GAAKgB,EAAOhB,EACpCkB,EAAQP,OAAKM,EAAMX,EAAMN,GAAKe,EAAOf,EACrCmB,EAAQR,OAAKO,EAAMjB,EAAKD,GAAKS,EAAMT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AAcgC,EAAEI,WAAWlE,IAAM2D,EAGlD,CACA,MAAOQ,GACH,OAAO,CACX,CAnFY,IAACJ,EAAG1H,EAAGC,EAlBX0D,CAsGZ,CACY,MAACoE,EAA0B,MAAC,CACpCC,aAAc/B,oBACdgC,KAAM9B,YACN+B,OAAQhB,cACR9B,MAAO,CACH+C,iBAAkBjG,EAAUkD,MAAM+C,iBAClCxC,cACApB,0BACRK,gBAAQA,EAAAA,gBACRoB,gBAAQA,EAAAA,gBACAnC,sBACRT,IAAQA,EAAAA,OAX+B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{sha256 as t}from"../../../../../@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.esm.js";import{randomBytes as e}from"../../../../../@noble_hashes@1.3.2/node_modules/@noble/hashes/esm/utils.esm.js";import{mod as f,Field as n,pow2 as r}from"./abstract/modular.esm.js";import{bytesToNumberBE as s,numberToBytesBE as o,concatBytes as i,ensureBytes as a}from"./abstract/utils.esm.js";import{createCurve as c}from"./_shortw_utils.esm.js";
|
|
2
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const g=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),u=BigInt(1),d=BigInt(2),divNearest=(t,e)=>(t+e/d)/e;function sqrtMod(t){const e=g,f=BigInt(3),n=BigInt(6),s=BigInt(11),o=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,b=r(u,f,e)*u%e,y=r(b,f,e)*u%e,m=r(y,d,e)*l%e,B=r(m,s,e)*m%e,I=r(B,o,e)*B%e,x=r(I,a,e)*I%e,p=r(x,c,e)*x%e,P=r(p,a,e)*I%e,w=r(P,f,e)*u%e,E=r(w,i,e)*B%e,v=r(E,n,e)*l%e,K=r(v,d,e);if(!h.eql(h.sqr(K),t))throw new Error("Cannot find square root");return K}const h=n(g,void 0,void 0,{sqrt:sqrtMod}),b=c({a:BigInt(0),b:BigInt(7),Fp:h,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=l,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-u*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,i=BigInt("0x100000000000000000000000000000000"),a=divNearest(o*t,e),c=divNearest(-r*t,e);let g=f(t-a*n-c*s,e),d=f(-a*r-c*o,e);const h=g>i,b=d>i;if(h&&(g=e-g),b&&(d=e-d),g>i||d>i)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:g,k2neg:b,k2:d}}}},t),y=BigInt(0),fe=t=>"bigint"==typeof t&&y<t&&t<g,m={};function taggedHash(e,...f){let n=m[e];if(void 0===n){const f=t(Uint8Array.from(e,(t=>t.charCodeAt(0))));n=i(f,f),m[e]=n}return t(i(n,...f))}const pointToBytes=t=>t.toRawBytes(!0).slice(1),numTo32b=t=>o(t,32),modP=t=>f(t,g),modN=t=>f(t,l),B=b.ProjectivePoint;function schnorrGetExtPubKey(t){let e=b.utils.normPrivateKeyToScalar(t),f=B.fromPrivateKey(e);return{scalar:f.hasEvenY()?e:modN(-e),bytes:pointToBytes(f)}}function lift_x(t){if(!fe(t))throw new Error("bad x: need 0 < x < p");const e=modP(t*t);let f=sqrtMod(modP(e*t+BigInt(7)));f%d!==y&&(f=modP(-f));const n=new B(t,f,u);return n.assertValidity(),n}function challenge(...t){return modN(s(taggedHash("BIP0340/challenge",...t)))}function schnorrGetPublicKey(t){return schnorrGetExtPubKey(t).bytes}function schnorrSign(t,f,n=e(32)){const r=a("message",t),{bytes:o,scalar:i}=schnorrGetExtPubKey(f),c=a("auxRand",n,32),g=numTo32b(i^s(taggedHash("BIP0340/aux",c))),l=taggedHash("BIP0340/nonce",g,o,r),u=modN(s(l));if(u===y)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=schnorrGetExtPubKey(u),b=challenge(d,o,r),m=new Uint8Array(64);if(m.set(d,0),m.set(numTo32b(modN(h+b*i)),32),!schnorrVerify(m,r,o))throw new Error("sign: Invalid signature produced");return m}function schnorrVerify(t,e,f){const n=a("signature",t,64),r=a("message",e),o=a("publicKey",f,32);try{const t=lift_x(s(o)),e=s(n.subarray(0,32));if(!fe(e))return!1;const f=s(n.subarray(32,64));if(!("bigint"==typeof(u=f)&&y<u&&u<l))return!1;const a=challenge(numTo32b(e),pointToBytes(t),r),d=(i=t,c=f,g=modN(-a),B.BASE.multiplyAndAddUnsafe(i,c,g));return!(!d||!d.hasEvenY()||d.toAffine().x!==e)}catch(t){return!1}var i,c,g,u}const I=(()=>({getPublicKey:schnorrGetPublicKey,sign:schnorrSign,verify:schnorrVerify,utils:{randomPrivateKey:b.utils.randomPrivateKey,lift_x:lift_x,pointToBytes:pointToBytes,numberToBytesBE:o,bytesToNumberBE:s,taggedHash:taggedHash,mod:f}}))();export{I as schnorr,b as secp256k1};
|
|
3
|
+
//# sourceMappingURL=secp256k1.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secp256k1.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.js"],"sourcesContent":["/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map"],"names":["secp256k1P","BigInt","secp256k1N","_1n","_2n","divNearest","a","b","sqrtMod","y","P","_3n","_6n","_11n","_22n","_23n","_44n","_88n","b2","b3","b6","pow2","b9","b11","b22","b44","b88","b176","b220","b223","t1","t2","root","Fp","eql","sqr","Error","Field","undefined","sqrt","secp256k1","createCurve","n","Gx","Gy","h","lowS","endo","beta","splitScalar","k","a1","b1","a2","POW_2_128","c1","c2","k1","mod","k2","k1neg","k2neg","sha256","_0n","fe","x","TAGGED_HASH_PREFIXES","taggedHash","tag","messages","tagP","tagH","Uint8Array","from","c","charCodeAt","concatBytes","pointToBytes","point","toRawBytes","slice","numTo32b","numberToBytesBE","modP","modN","Point","ProjectivePoint","schnorrGetExtPubKey","priv","d_","utils","normPrivateKeyToScalar","p","fromPrivateKey","scalar","hasEvenY","bytes","lift_x","xx","assertValidity","challenge","args","bytesToNumberBE","schnorrGetPublicKey","privateKey","schnorrSign","message","auxRand","randomBytes","m","ensureBytes","px","d","t","rand","k_","rx","e","sig","set","schnorrVerify","signature","publicKey","pub","r","subarray","s","R","Q","BASE","multiplyAndAddUnsafe","toAffine","error","schnorr","getPublicKey","sign","verify","randomPrivateKey"],"mappings":";sEAQA,MAAMA,EAAaC,OAAO,sEACpBC,EAAaD,OAAO,sEACpBE,EAAMF,OAAO,GACbG,EAAMH,OAAO,GACbI,WAAa,CAACC,EAAGC,KAAOD,EAAIC,EAAIH,GAAOG,EAK7C,SAASC,QAAQC,GACb,MAAMC,EAAIV,EAEJW,EAAMV,OAAO,GAAIW,EAAMX,OAAO,GAAIY,EAAOZ,OAAO,IAAKa,EAAOb,OAAO,IAEnEc,EAAOd,OAAO,IAAKe,EAAOf,OAAO,IAAKgB,EAAOhB,OAAO,IACpDiB,EAAMT,EAAIA,EAAIA,EAAKC,EACnBS,EAAMD,EAAKA,EAAKT,EAAKC,EACrBU,EAAMC,EAAKF,EAAIR,EAAKD,GAAKS,EAAMT,EAC/BY,EAAMD,EAAKD,EAAIT,EAAKD,GAAKS,EAAMT,EAC/Ba,EAAOF,EAAKC,EAAIlB,EAAKM,GAAKQ,EAAMR,EAChCc,EAAOH,EAAKE,EAAKV,EAAMH,GAAKa,EAAOb,EACnCe,EAAOJ,EAAKG,EAAKV,EAAMJ,GAAKc,EAAOd,EACnCgB,EAAOL,EAAKI,EAAKT,EAAMN,GAAKe,EAAOf,EACnCiB,EAAQN,EAAKK,EAAKT,EAAMP,GAAKgB,EAAOhB,EACpCkB,EAAQP,EAAKM,EAAMX,EAAMN,GAAKe,EAAOf,EACrCmB,EAAQR,EAAKO,EAAMjB,EAAKD,GAAKS,EAAMT,EACnCoB,EAAMT,EAAKQ,EAAMd,EAAML,GAAKc,EAAOd,EACnCqB,EAAMV,EAAKS,EAAIlB,EAAKF,GAAKQ,EAAMR,EAC/BsB,EAAOX,EAAKU,EAAI3B,EAAKM,GA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":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function number(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function bool(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function bytes(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function hash(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");number(e.outputLen),number(e.blockLen)}function exists(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function output(e,t){bytes(e);const o=t.outputLen;if(e.length<o)throw new Error(`digestInto() expects output buffer of length at least ${o}`)}Object.defineProperty(exports,"__esModule",{value:!0});const e={number:number,bool:bool,bytes:bytes,hash:hash,exists:exists,output:output};exports.bool=bool,exports.bytes=bytes,exports.default=e,exports.exists=exists,exports.hash=hash,exports.number=number,exports.output=output;
|
|
2
|
+
//# sourceMappingURL=_assert.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_assert.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js"],"sourcesContent":["export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map"],"names":["number","n","Number","isSafeInteger","Error","bool","b","bytes","lengths","Uint8Array","length","includes","hash","create","outputLen","blockLen","exists","instance","checkFinished","destroyed","finished","output","out","min","assert"],"mappings":"aAAO,SAASA,OAAOC,GACnB,IAAKC,OAAOC,cAAcF,IAAMA,EAAI,EAChC,MAAM,IAAIG,MAAM,2BAA2BH,IACnD,CACO,SAASI,KAAKC,GACjB,GAAiB,kBAANA,EACP,MAAM,IAAIF,MAAM,yBAAyBE,IACjD,CACO,SAASC,MAAMD,KAAME,GACxB,KAAMF,aAAaG,YACf,MAAM,IAAIL,MAAM,uBACpB,GAAII,EAAQE,OAAS,IAAMF,EAAQG,SAASL,EAAEI,QAC1C,MAAM,IAAIN,MAAM,iCAAiCI,oBAA0BF,EAAEI,SACrF,CACO,SAASE,KAAKA,GACjB,GAAoB,mBAATA,GAA8C,mBAAhBA,EAAKC,OAC1C,MAAM,IAAIT,MAAM,mDACpBJ,OAAOY,EAAKE,WACZd,OAAOY,EAAKG,SAChB,CACO,SAASC,OAAOC,EAAUC,GAAgB,GAC7C,GAAID,EAASE,UACT,MAAM,IAAIf,MAAM,oCACpB,GAAIc,GAAiBD,EAASG,SAC1B,MAAM,IAAIhB,MAAM,wCACxB,CACO,SAASiB,OAAOC,EAAKL,GACxBV,MAAMe,GACN,MAAMC,EAAMN,EAASH,UACrB,GAAIQ,EAAIZ,OAASa,EACb,MAAM,IAAInB,MAAM,yDAAyDmB,IAEjF,wDACK,MAACC,EAAS,CACXxB,cACAK,UACAE,YACAK,UACAI,cACAK","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function number(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function bool(t){if("boolean"!=typeof t)throw new Error(`Expected boolean, not ${t}`)}function bytes(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function hash(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");number(t.outputLen),number(t.blockLen)}function exists(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function output(t,e){bytes(t);const o=e.outputLen;if(t.length<o)throw new Error(`digestInto() expects output buffer of length at least ${o}`)}const t={number:number,bool:bool,bytes:bytes,hash:hash,exists:exists,output:output};export{bool,bytes,t as default,exists,hash,number,output};
|
|
2
|
+
//# sourceMappingURL=_assert.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_assert.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js"],"sourcesContent":["export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map"],"names":["number","n","Number","isSafeInteger","Error","bool","b","bytes","lengths","Uint8Array","length","includes","hash","create","outputLen","blockLen","exists","instance","checkFinished","destroyed","finished","output","out","min","assert"],"mappings":"AAAO,SAASA,OAAOC,GACnB,IAAKC,OAAOC,cAAcF,IAAMA,EAAI,EAChC,MAAM,IAAIG,MAAM,2BAA2BH,IACnD,CACO,SAASI,KAAKC,GACjB,GAAiB,kBAANA,EACP,MAAM,IAAIF,MAAM,yBAAyBE,IACjD,CACO,SAASC,MAAMD,KAAME,GACxB,KAAMF,aAAaG,YACf,MAAM,IAAIL,MAAM,uBACpB,GAAII,EAAQE,OAAS,IAAMF,EAAQG,SAASL,EAAEI,QAC1C,MAAM,IAAIN,MAAM,iCAAiCI,oBAA0BF,EAAEI,SACrF,CACO,SAASE,KAAKA,GACjB,GAAoB,mBAATA,GAA8C,mBAAhBA,EAAKC,OAC1C,MAAM,IAAIT,MAAM,mDACpBJ,OAAOY,EAAKE,WACZd,OAAOY,EAAKG,SAChB,CACO,SAASC,OAAOC,EAAUC,GAAgB,GAC7C,GAAID,EAASE,UACT,MAAM,IAAIf,MAAM,oCACpB,GAAIc,GAAiBD,EAASG,SAC1B,MAAM,IAAIhB,MAAM,wCACxB,CACO,SAASiB,OAAOC,EAAKL,GACxBV,MAAMe,GACN,MAAMC,EAAMN,EAASH,UACrB,GAAIQ,EAAIZ,OAASa,EACb,MAAM,IAAInB,MAAM,yDAAyDmB,IAEjF,CACK,MAACC,EAAS,CACXxB,cACAK,UACAE,YACAK,UACAI,cACAK","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("./_assert.cjs.js"),s=require("./utils.cjs.js");class SHA2 extends s.Hash{constructor(t,e,i,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=i,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=s.createView(this.buffer)}update(e){t.default.exists(this);const{view:i,buffer:n,blockLen:r}=this,h=(e=s.toBytes(e)).length;for(let t=0;t<h;){const o=Math.min(r-this.pos,h-t);if(o!==r)n.set(e.subarray(t,t+o),this.pos),this.pos+=o,t+=o,this.pos===r&&(this.process(i,0),this.pos=0);else{const i=s.createView(e);for(;r<=h-t;t+=r)this.process(i,t)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){t.default.exists(this),t.default.output(e,this),this.finished=!0;const{buffer:i,view:n,blockLen:r,isLE:h}=this;let{pos:o}=this;i[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(n,0),o=0);for(let t=o;t<r;t++)i[t]=0;!function setBigUint64(t,s,e,i){if("function"==typeof t.setBigUint64)return t.setBigUint64(s,e,i);const n=BigInt(32),r=BigInt(4294967295),h=Number(e>>n&r),o=Number(e&r),u=i?4:0,f=i?0:4;t.setUint32(s+u,h,i),t.setUint32(s+f,o,i)}(n,r-8,BigInt(8*this.length),h),this.process(n,0);const u=s.createView(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=f/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<c;t++)u.setUint32(4*t,l[t],h)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const e=t.slice(0,s);return this.destroy(),e}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:e,length:i,finished:n,destroyed:r,pos:h}=this;return t.length=i,t.pos=h,t.finished=n,t.destroyed=r,i%s&&t.buffer.set(e),t}}exports.SHA2=SHA2;
|
|
2
|
+
//# sourceMappingURL=_sha2.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_sha2.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js"],"sourcesContent":["import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map"],"names":["SHA2","Hash","constructor","blockLen","outputLen","padOffset","isLE","super","this","finished","length","pos","destroyed","buffer","Uint8Array","view","createView","update","data","assert","exists","len","toBytes","take","Math","min","set","subarray","process","dataView","roundClean","digestInto","out","output","fill","i","setBigUint64","byteOffset","value","_32n","BigInt","_u32_max","wh","Number","wl","h","l","setUint32","oview","Error","outLen","state","get","digest","res","slice","destroy","_cloneInto","to"],"mappings":"2EAgBO,MAAMA,aAAaC,EAAAA,KACtB,WAAAC,CAAYC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AAEA,EAASD,IAAEA,GAAQH,KAO/D,OANAkD,EAAGhD,OAASA,EACZgD,EAAG/C,IAAMA,EACT+C,EAAGjD,SAAWA,EACdiD,EAAG9C,UAAYA,EACXF,EAASP,GACTuD,EAAG7C,OAAOa,IAAIb,GACX6C,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"./_assert.esm.js";import{Hash as s,createView as e,toBytes as i}from"./utils.esm.js";class SHA2 extends s{constructor(t,s,i,n){super(),this.blockLen=t,this.outputLen=s,this.padOffset=i,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=e(this.buffer)}update(s){t.exists(this);const{view:n,buffer:o,blockLen:h}=this,r=(s=i(s)).length;for(let t=0;t<r;){const i=Math.min(h-this.pos,r-t);if(i!==h)o.set(s.subarray(t,t+i),this.pos),this.pos+=i,t+=i,this.pos===h&&(this.process(n,0),this.pos=0);else{const i=e(s);for(;h<=r-t;t+=h)this.process(i,t)}}return this.length+=s.length,this.roundClean(),this}digestInto(s){t.exists(this),t.output(s,this),this.finished=!0;const{buffer:i,view:n,blockLen:o,isLE:h}=this;let{pos:r}=this;i[r++]=128,this.buffer.subarray(r).fill(0),this.padOffset>o-r&&(this.process(n,0),r=0);for(let t=r;t<o;t++)i[t]=0;!function setBigUint64(t,s,e,i){if("function"==typeof t.setBigUint64)return t.setBigUint64(s,e,i);const n=BigInt(32),o=BigInt(4294967295),h=Number(e>>n&o),r=Number(e&o),f=i?4:0,u=i?0:4;t.setUint32(s+f,h,i),t.setUint32(s+u,r,i)}(n,o-8,BigInt(8*this.length),h),this.process(n,0);const f=e(s),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=u/4,p=this.get();if(c>p.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<c;t++)f.setUint32(4*t,p[t],h)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const e=t.slice(0,s);return this.destroy(),e}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:e,length:i,finished:n,destroyed:o,pos:h}=this;return t.length=i,t.pos=h,t.finished=n,t.destroyed=o,i%s&&t.buffer.set(e),t}}export{SHA2};
|
|
2
|
+
//# sourceMappingURL=_sha2.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_sha2.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js"],"sourcesContent":["import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map"],"names":["SHA2","Hash","constructor","blockLen","outputLen","padOffset","isLE","super","this","finished","length","pos","destroyed","buffer","Uint8Array","view","createView","update","data","assert","exists","len","toBytes","take","Math","min","set","subarray","process","dataView","roundClean","digestInto","out","output","fill","i","setBigUint64","byteOffset","value","_32n","BigInt","_u32_max","wh","Number","wl","h","l","setUint32","oview","Error","outLen","state","get","digest","res","slice","destroy","_cloneInto","to"],"mappings":"mGAgBO,MAAMA,aAAaC,EACtB,WAAAC,CAAYC,EAAUC,EAAWC,EAAWC,GACxCC,QACAC,KAAKL,SAAWA,EAChBK,KAAKJ,UAAYA,EACjBI,KAAKH,UAAYA,EACjBG,KAAKF,KAAOA,EACZE,KAAKC,UAAW,EAChBD,KAAKE,OAAS,EACdF,KAAKG,IAAM,EACXH,KAAKI,WAAY,EACjBJ,KAAKK,OAAS,IAAIC,WAAWX,GAC7BK,KAAKO,KAAOC,EAAWR,KAAKK,OAChC,CACA,MAAAI,CAAOC,GACHC,EAAOC,OAAOZ,MACd,MAAMO,KAAEA,EAAIF,OAAEA,EAAMV,SAAEA,GAAaK,KAE7Ba,GADNH,EAAOI,EAAQJ,IACER,OACjB,IAAK,IAAIC,EAAM,EAAGA,EAAMU,GAAM,CAC1B,MAAME,EAAOC,KAAKC,IAAItB,EAAWK,KAAKG,IAAKU,EAAMV,GAEjD,GAAIY,IAASpB,EAMbU,EAAOa,IAAIR,EAAKS,SAAShB,EAAKA,EAAMY,GAAOf,KAAKG,KAChDH,KAAKG,KAAOY,EACZZ,GAAOY,EACHf,KAAKG,MAAQR,IACbK,KAAKoB,QAAQb,EAAM,GACnBP,KAAKG,IAAM,OAXf,CACI,MAAMkB,EAAWb,EAAWE,GAC5B,KAAOf,GAAYkB,EAAMV,EAAKA,GAAOR,EACjCK,KAAKoB,QAAQC,EAAUlB,EAE/B,CAQJ,CAGA,OAFAH,KAAKE,QAAUQ,EAAKR,OACpBF,KAAKsB,aACEtB,IACX,CACA,UAAAuB,CAAWC,GACPb,EAAOC,OAAOZ,MACdW,EAAOc,OAAOD,EAAKxB,MACnBA,KAAKC,UAAW,EAIhB,MAAMI,OAAEA,EAAME,KAAEA,EAAIZ,SAAEA,EAAQG,KAAEA,GAASE,KACzC,IA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A,EAAK,IAAIlD,KAAKN,aACrBwD,EAAGhC,OAAOlB,KAAK4C,OACf,MAAMjD,SAAEA,EAAQU,OAAEA,EAAMH,OAAEA,EAAMD,SAAEA,EAAQG,UAAEA,EAASD,IAAEA,GAAQH,KAO/D,OANAkD,EAAGhD,OAASA,EACZgD,EAAG/C,IAAMA,EACT+C,EAAGjD,SAAWA,EACdiD,EAAG9C,UAAYA,EACXF,EAASP,GACTuD,EAAG7C,OAAOa,IAAIb,GACX6C,CACX","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.js"],"sourcesContent":["export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map"],"names":["crypto","globalThis","undefined"],"mappings":"aAAY,MAACA,EAA+B,iBAAfC,YAA2B,WAAYA,WAAaA,WAAWD,YAASE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.js"],"sourcesContent":["export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map"],"names":["crypto","globalThis","undefined"],"mappings":"AAAY,MAACA,EAA+B,iBAAfC,YAA2B,WAAYA,WAAaA,WAAWD,YAASE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("./_assert.cjs.js"),e=require("./utils.cjs.js"),r=require("./hmac.cjs.js");const n=new Uint8Array([0]),s=new Uint8Array;exports.expand=function expand(e,u,o,a=32){if(t.default.hash(e),t.default.number(a),a>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const c=Math.ceil(a/e.outputLen);void 0===o&&(o=s);const i=new Uint8Array(c*e.outputLen),l=r.hmac.create(e,u),d=l._cloneInto(),h=new Uint8Array(l.outputLen);for(let t=0;t<c;t++)n[0]=t+1,d.update(0===t?s:h).update(o).update(n).digestInto(h),i.set(h,e.outputLen*t),l._cloneInto(d);return l.destroy(),d.destroy(),h.fill(0),n.fill(0),i.slice(0,a)},exports.extract=function extract(n,s,u){return t.default.hash(n),r.hmac(n,e.toBytes(u),e.toBytes(s))};
|
|
2
|
+
//# sourceMappingURL=hkdf.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hkdf.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.js"],"sourcesContent":["import assert from './_assert.js';\nimport { toBytes } from './utils.js';\nimport { hmac } from './hmac.js';\n// HKDF (RFC 5869)\n// https://soatok.blog/2021/11/17/understanding-hkdf/\n/**\n * HKDF-Extract(IKM, salt) -> PRK\n * Arguments position differs from spec (IKM is first one, since it is not optional)\n * @param hash\n * @param ikm\n * @param salt\n * @returns\n */\nexport function extract(hash, ikm, salt) {\n assert.hash(hash);\n // NOTE: some libraries treat zero-length array as 'not provided';\n // we don't, since we have undefined as 'not provided'\n // https://github.com/RustCrypto/KDFs/issues/15\n if (salt === undefined)\n salt = new Uint8Array(hash.outputLen); // if not provided, it is set to a string of HashLen zeros\n return hmac(hash, toBytes(salt), toBytes(ikm));\n}\n// HKDF-Expand(PRK, info, L) -> OKM\nconst HKDF_COUNTER = new Uint8Array([0]);\nconst EMPTY_BUFFER = new Uint8Array();\n/**\n * HKDF-expand from the spec.\n * @param prk - a pseudorandom key of at least HashLen octets (usually, the output from the extract step)\n * @param info - optional context and application specific information (can be a zero-length string)\n * @param length - length of output keying material in octets\n */\nexport function expand(hash, prk, info, length = 32) {\n assert.hash(hash);\n assert.number(length);\n if (length > 255 * hash.outputLen)\n throw new Error('Length should be <= 255*HashLen');\n const blocks = Math.ceil(length / hash.outputLen);\n if (info === undefined)\n info = EMPTY_BUFFER;\n // first L(ength) octets of T\n const okm = new Uint8Array(blocks * hash.outputLen);\n // Re-use HMAC instance between blocks\n const HMAC = hmac.create(hash, prk);\n const HMACTmp = HMAC._cloneInto();\n const T = new Uint8Array(HMAC.outputLen);\n for (let counter = 0; counter < blocks; counter++) {\n HKDF_COUNTER[0] = counter + 1;\n // T(0) = empty string (zero length)\n // T(N) = HMAC-Hash(PRK, T(N-1) | info | N)\n HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T)\n .update(info)\n .update(HKDF_COUNTER)\n .digestInto(T);\n okm.set(T, hash.outputLen * counter);\n HMAC._cloneInto(HMACTmp);\n }\n HMAC.destroy();\n HMACTmp.destroy();\n T.fill(0);\n HKDF_COUNTER.fill(0);\n return okm.slice(0, length);\n}\n/**\n * HKDF (RFC 5869): extract + expand in one step.\n * @param hash - hash function that would be used (e.g. sha256)\n * @param ikm - input keying material, the initial key\n * @param salt - optional salt value (a non-secret random value)\n * @param info - optional context and application specific information\n * @param length - length of output keying material in octets\n */\nexport const hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);\n//# sourceMappingURL=hkdf.js.map"],"names":["HKDF_COUNTER","Uint8Array","EMPTY_BUFFER","expand","hash","prk","info","length","assert","number","outputLen","Error","blocks","Math","ceil","undefined","okm","HMAC","hmac","create","HMACTmp","_cloneInto","T","counter","update","digestInto","set","destroy","fill","slice","extract","ikm","salt","toBytes"],"mappings":"sGAuBA,MAAMA,EAAe,IAAIC,WAAW,CAAC,IAC/BC,EAAe,IAAID,0BAOlB,SAASE,OAAOC,EAAMC,EAAKC,EAAMC,EAAS,IAG7C,GAFAC,EAAAA,QAAOJ,KAAKA,GACZI,EAAAA,QAAOC,OAAOF,GACVA,EAAS,IAAMH,EAAKM,UACpB,MAAM,IAAIC,MAAM,mCACpB,MAAMC,EAASC,KAAKC,KAAKP,EAASH,EAAKM,gBAC1BK,IAATT,IACAA,EAAOJ,GAEX,MAAMc,EAAM,IAAIf,WAAWW,EAASR,EAAKM,WAEnCO,EAAOC,EAAAA,KAAKC,OAAOf,EAAMC,GACzBe,EAAUH,EAAKI,aACfC,EAAI,IAAIrB,WAAWgB,EAAKP,WAC9B,IAAK,IAAIa,EAAU,EAAGA,EAAUX,EAAQW,IACpCvB,EAAa,GAAKuB,EAAU,EAG5BH,EAAQI,OAAmB,IAAZD,EAAgBrB,EAAeoB,GACzCE,OAAOlB,GACPkB,OAAOxB,GACPyB,WAAWH,GAChBN,EAAIU,IAAIJ,EAAGlB,EAAKM,UAAYa,GAC5BN,EAAKI,WAAWD,GAMpB,OAJAH,EAAKU,UACLP,EAAQO,UACRL,EAAEM,KAAK,GACP5B,EAAa4B,KAAK,GACXZ,EAAIa,MAAM,EAAGtB,EACxB,kBAhDO,SAASuB,QAAQ1B,EAAM2B,EAAKC,GAO/B,OANAxB,EAAAA,QAAOJ,KAAKA,GAMLc,EAAAA,KAAKd,EAAM6B,EAAAA,QAAQD,GAAOC,EAAAA,QAAQF,GAC7C","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"./_assert.esm.js";import{toBytes as e}from"./utils.esm.js";import{hmac as n}from"./hmac.esm.js";function extract(r,o,s){return t.hash(r),n(r,e(s),e(o))}const r=new Uint8Array([0]),o=new Uint8Array;function expand(e,s,u,a=32){if(t.hash(e),t.number(a),a>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const i=Math.ceil(a/e.outputLen);void 0===u&&(u=o);const p=new Uint8Array(i*e.outputLen),c=n.create(e,s),l=c._cloneInto(),m=new Uint8Array(c.outputLen);for(let t=0;t<i;t++)r[0]=t+1,l.update(0===t?o:m).update(u).update(r).digestInto(m),p.set(m,e.outputLen*t),c._cloneInto(l);return c.destroy(),l.destroy(),m.fill(0),r.fill(0),p.slice(0,a)}export{expand,extract};
|
|
2
|
+
//# sourceMappingURL=hkdf.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hkdf.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/hkdf.js"],"sourcesContent":["import assert from './_assert.js';\nimport { toBytes } from './utils.js';\nimport { hmac } from './hmac.js';\n// HKDF (RFC 5869)\n// https://soatok.blog/2021/11/17/understanding-hkdf/\n/**\n * HKDF-Extract(IKM, salt) -> PRK\n * Arguments position differs from spec (IKM is first one, since it is not optional)\n * @param hash\n * @param ikm\n * @param salt\n * @returns\n */\nexport function extract(hash, ikm, salt) {\n assert.hash(hash);\n // NOTE: some libraries treat zero-length array as 'not provided';\n // we don't, since we have undefined as 'not provided'\n // https://github.com/RustCrypto/KDFs/issues/15\n if (salt === undefined)\n salt = new Uint8Array(hash.outputLen); // if not provided, it is set to a string of HashLen zeros\n return hmac(hash, toBytes(salt), toBytes(ikm));\n}\n// HKDF-Expand(PRK, info, L) -> OKM\nconst HKDF_COUNTER = new Uint8Array([0]);\nconst EMPTY_BUFFER = new Uint8Array();\n/**\n * HKDF-expand from the spec.\n * @param prk - a pseudorandom key of at least HashLen octets (usually, the output from the extract step)\n * @param info - optional context and application specific information (can be a zero-length string)\n * @param length - length of output keying material in octets\n */\nexport function expand(hash, prk, info, length = 32) {\n assert.hash(hash);\n assert.number(length);\n if (length > 255 * hash.outputLen)\n throw new Error('Length should be <= 255*HashLen');\n const blocks = Math.ceil(length / hash.outputLen);\n if (info === undefined)\n info = EMPTY_BUFFER;\n // first L(ength) octets of T\n const okm = new Uint8Array(blocks * hash.outputLen);\n // Re-use HMAC instance between blocks\n const HMAC = hmac.create(hash, prk);\n const HMACTmp = HMAC._cloneInto();\n const T = new Uint8Array(HMAC.outputLen);\n for (let counter = 0; counter < blocks; counter++) {\n HKDF_COUNTER[0] = counter + 1;\n // T(0) = empty string (zero length)\n // T(N) = HMAC-Hash(PRK, T(N-1) | info | N)\n HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T)\n .update(info)\n .update(HKDF_COUNTER)\n .digestInto(T);\n okm.set(T, hash.outputLen * counter);\n HMAC._cloneInto(HMACTmp);\n }\n HMAC.destroy();\n HMACTmp.destroy();\n T.fill(0);\n HKDF_COUNTER.fill(0);\n return okm.slice(0, length);\n}\n/**\n * HKDF (RFC 5869): extract + expand in one step.\n * @param hash - hash function that would be used (e.g. sha256)\n * @param ikm - input keying material, the initial key\n * @param salt - optional salt value (a non-secret random value)\n * @param info - optional context and application specific information\n * @param length - length of output keying material in octets\n */\nexport const hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);\n//# sourceMappingURL=hkdf.js.map"],"names":["extract","hash","ikm","salt","assert","hmac","toBytes","HKDF_COUNTER","Uint8Array","EMPTY_BUFFER","expand","prk","info","length","number","outputLen","Error","blocks","Math","ceil","undefined","okm","HMAC","create","HMACTmp","_cloneInto","T","counter","update","digestInto","set","destroy","fill","slice"],"mappings":"8GAaO,SAASA,QAAQC,EAAMC,EAAKC,GAO/B,OANAC,EAAOH,KAAKA,GAMLI,EAAKJ,EAAMK,EAAQH,GAAOG,EAAQJ,GAC7C,CAEA,MAAMK,EAAe,IAAIC,WAAW,CAAC,IAC/BC,EAAe,IAAID,WAOlB,SAASE,OAAOT,EAAMU,EAAKC,EAAMC,EAAS,IAG7C,GAFAT,EAAOH,KAAKA,GACZG,EAAOU,OAAOD,GACVA,EAAS,IAAMZ,EAAKc,UACpB,MAAM,IAAIC,MAAM,mCACpB,MAAMC,EAASC,KAAKC,KAAKN,EAASZ,EAAKc,gBAC1BK,IAATR,IACAA,EAAOH,GAEX,MAAMY,EAAM,IAAIb,WAAWS,EAAShB,EAAKc,WAEnCO,EAAOjB,EAAKkB,OAAOtB,EAAMU,GACzBa,EAAUF,EAAKG,aACfC,EAAI,IAAIlB,WAAWc,EAAKP,WAC9B,IAAK,IAAIY,EAAU,EAAGA,EAAUV,EAAQU,IACpCpB,EAAa,GAAKoB,EAAU,EAG5BH,EAAQI,OAAmB,IAAZD,EAAgBlB,EAAeiB,GACzCE,OAAOhB,GACPgB,OAAOrB,GACPsB,WAAWH,GAChBL,EAAIS,IAAIJ,EAAGzB,EAAKc,UAAYY,GAC5BL,EAAKG,WAAWD,GAMpB,OAJAF,EAAKS,UACLP,EAAQO,UACRL,EAAEM,KAAK,GACPzB,EAAayB,KAAK,GACXX,EAAIY,MAAM,EAAGpB,EACxB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("./_assert.cjs.js"),s=require("./utils.cjs.js");class HMAC extends s.Hash{constructor(e,i){super(),this.finished=!1,this.destroyed=!1,t.default.hash(e);const h=s.toBytes(i);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,n=new Uint8Array(o);n.set(h.length>o?e.create().update(h).digest():h);for(let t=0;t<n.length;t++)n[t]^=54;this.iHash.update(n),this.oHash=e.create();for(let t=0;t<n.length;t++)n[t]^=106;this.oHash.update(n),n.fill(0)}update(s){return t.default.exists(this),this.iHash.update(s),this}digestInto(s){t.default.exists(this),t.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:e,finished:i,destroyed:h,blockLen:o,outputLen:n}=this;return t.finished=i,t.destroyed=h,t.blockLen=o,t.outputLen=n,t.oHash=s._cloneInto(t.oHash),t.iHash=e._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const hmac=(t,s,e)=>new HMAC(t,s).update(e).digest();hmac.create=(t,s)=>new HMAC(t,s),exports.HMAC=HMAC,exports.hmac=hmac;
|
|
2
|
+
//# sourceMappingURL=hmac.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.js"],"sourcesContent":["import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map"],"names":["HMAC","Hash","constructor","hash","_key","super","this","finished","destroyed","assert","key","toBytes","iHash","create","update","Error","blockLen","outputLen","pad","Uint8Array","set","length","digest","i","oHash","fill","buf","exists","digestInto","out","bytes","destroy","_cloneInto","to","Object","getPrototypeOf","hmac","message"],"mappings":"2EAGO,MAAMA,aAAaC,EAAAA,KACtB,WAAAC,CAAYC,EAAMC,GACdC,QACAC,KAAKC,UAAW,EAChBD,KAAKE,WAAY,EACjBC,EAAAA,QAAON,KAAKA,GACZ,MAAMO,EAAMC,EAAAA,QAAQP,GAEpB,GADAE,KAAKM,MAAQT,EAAKU,SACe,mBAAtBP,KAAKM,MAAME,OAClB,MAAM,IAAIC,MAAM,uDACpBT,KAAKU,SAAWV,KAAKM,MAAMI,SAC3BV,KAAKW,UAAYX,KAAKM,MAAMK,UAC5B,MAAMD,EAAWV,KAAKU,SAChBE,EAAM,IAAIC,WAAWH,GAE3BE,EAAIE,IAAIV,EAAIW,OAASL,EAAWb,EAAKU,SAASC,OAAOJ,GAAKY,SAAWZ,GACrE,IAAK,IAAIa,EAAI,EAAGA,EAAIL,EAAIG,OAAQE,IAC5BL,EAAIK,IAAM,GACdjB,KAAKM,MAAME,OAAOI,GAElBZ,KAAKkB,MAAQrB,EAAKU,SAElB,IAAK,IAAIU,EAAI,EAAGA,EAAIL,EAAIG,OAAQE,IAC5BL,EAAIK,IAAM,IACdjB,KAAKkB,MAAMV,OAAOI,GAClBA,EAAIO,KAAK,EACb,CACA,MAAAX,CAAOY,GAGH,OAFAjB,EAAAA,QAAOkB,OAAOrB,MACdA,KAAKM,MAAME,OAAOY,GACXpB,IACX,CACA,UAAAsB,CAAWC,GACPpB,EAAAA,QAAOkB,OAAOrB,MACdG,EAAAA,QAAOqB,MAAMD,EAAKvB,KAAKW,WACvBX,KAAKC,UAAW,EAChBD,KAAKM,MAAMgB,WAAWC,GACtBvB,KAAKkB,MAAMV,OAAOe,GAClBvB,KAAKkB,MAAMI,WAAWC,GACtBvB,KAAKyB,SACT,CACA,MAAAT,GACI,MAAMO,EAAM,IAAIV,WAAWb,KAAKkB,MAAMP,WAEtC,OADAX,KAAKsB,WAAWC,GACTA,CACX,CACA,UAAAG,CAAWC,GAEPA,IAAOA,EAAKC,OAAOrB,OAAOqB,OAAOC,eAAe7B,MAAO,CAAA,IACvD,MAAMkB,MAAEA,EAAKZ,MAAEA,EAAKL,SAAEA,EAAQC,UAAEA,EAASQ,SAAEA,EAAQC,UAAEA,GAAcX,KAQnE,OANA2B,EAAG1B,SAAWA,EACd0B,EAAGzB,UAAYA,EACfyB,EAAGjB,SAAWA,EACdiB,EAAGhB,UAAYA,EACfgB,EAAGT,MAAQA,EAAMQ,WAAWC,EAAGT,OAC/BS,EAAGrB,MAAQA,EAAMoB,WAAWC,EAAGrB,OACxBqB,CACX,CACA,OAAAF,GACIzB,KAAKE,WAAY,EACjBF,KAAKkB,MAAMO,UACXzB,KAAKM,MAAMmB,SACf,EAQQ,MAACK,KAAO,CAACjC,EAAMO,EAAK2B,IAAY,IAAIrC,KAAKG,EAAMO,GAAKI,OAAOuB,GAASf,SAChFc,KAAKvB,OAAS,CAACV,EAAMO,IAAQ,IAAIV,KAAKG,EAAMO","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"./_assert.esm.js";import{Hash as s,toBytes as e}from"./utils.esm.js";class HMAC extends s{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,t.hash(s);const h=e(i);if(this.iHash=s.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,n=new Uint8Array(o);n.set(h.length>o?s.create().update(h).digest():h);for(let t=0;t<n.length;t++)n[t]^=54;this.iHash.update(n),this.oHash=s.create();for(let t=0;t<n.length;t++)n[t]^=106;this.oHash.update(n),n.fill(0)}update(s){return t.exists(this),this.iHash.update(s),this}digestInto(s){t.exists(this),t.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:e,finished:i,destroyed:h,blockLen:o,outputLen:n}=this;return t.finished=i,t.destroyed=h,t.blockLen=o,t.outputLen=n,t.oHash=s._cloneInto(t.oHash),t.iHash=e._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const hmac=(t,s,e)=>new HMAC(t,s).update(e).digest();hmac.create=(t,s)=>new HMAC(t,s);export{HMAC,hmac};
|
|
2
|
+
//# sourceMappingURL=hmac.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.js"],"sourcesContent":["import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map"],"names":["HMAC","Hash","constructor","hash","_key","super","this","finished","destroyed","assert","key","toBytes","iHash","create","update","Error","blockLen","outputLen","pad","Uint8Array","set","length","digest","i","oHash","fill","buf","exists","digestInto","out","bytes","destroy","_cloneInto","to","Object","getPrototypeOf","hmac","message"],"mappings":"mFAGO,MAAMA,aAAaC,EACtB,WAAAC,CAAYC,EAAMC,GACdC,QACAC,KAAKC,UAAW,EAChBD,KAAKE,WAAY,EACjBC,EAAON,KAAKA,GACZ,MAAMO,EAAMC,EAAQP,GAEp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ACdiB,EAAGhB,UAAYA,EACfgB,EAAGT,MAAQA,EAAMQ,WAAWC,EAAGT,OAC/BS,EAAGrB,MAAQA,EAAMoB,WAAWC,EAAGrB,OACxBqB,CACX,CACA,OAAAF,GACIzB,KAAKE,WAAY,EACjBF,KAAKkB,MAAMO,UACXzB,KAAKM,MAAMmB,SACf,EAQQ,MAACK,KAAO,CAACjC,EAAMO,EAAK2B,IAAY,IAAIrC,KAAKG,EAAMO,GAAKI,OAAOuB,GAASf,SAChFc,KAAKvB,OAAS,CAACV,EAAMO,IAAQ,IAAIV,KAAKG,EAAMO","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("./_sha2.cjs.js"),s=require("./utils.cjs.js");const Maj=(t,s,r)=>t&s^t&r^s&r,r=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),h=new Uint32Array(64);class SHA256 extends t.SHA2{constructor(){super(64,32,8,!1),this.A=0|i[0],this.B=0|i[1],this.C=0|i[2],this.D=0|i[3],this.E=0|i[4],this.F=0|i[5],this.G=0|i[6],this.H=0|i[7]}get(){const{A:t,B:s,C:r,D:i,E:h,F:e,G:o,H:n}=this;return[t,s,r,i,h,e,o,n]}set(t,s,r,i,h,e,o,n){this.A=0|t,this.B=0|s,this.C=0|r,this.D=0|i,this.E=0|h,this.F=0|e,this.G=0|o,this.H=0|n}process(t,i){for(let s=0;s<16;s++,i+=4)h[s]=t.getUint32(i,!1);for(let t=16;t<64;t++){const r=h[t-15],i=h[t-2],e=s.rotr(r,7)^s.rotr(r,18)^r>>>3,o=s.rotr(i,17)^s.rotr(i,19)^i>>>10;h[t]=o+h[t-7]+e+h[t-16]|0}let{A:e,B:o,C:n,D:c,E:u,F:A,G:a,H:l}=this;for(let t=0;t<64;t++){const i=l+(s.rotr(u,6)^s.rotr(u,11)^s.rotr(u,25))+((H=u)&A^~H&a)+r[t]+h[t]|0,C=(s.rotr(e,2)^s.rotr(e,13)^s.rotr(e,22))+Maj(e,o,n)|0;l=a,a=A,A=u,u=c+i|0,c=n,n=o,o=e,e=i+C|0}var H;e=e+this.A|0,o=o+this.B|0,n=n+this.C|0,c=c+this.D|0,u=u+this.E|0,A=A+this.F|0,a=a+this.G|0,l=l+this.H|0,this.set(e,o,n,c,u,A,a,l)}roundClean(){h.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const e=s.wrapConstructor((()=>new SHA256));s.wrapConstructor((()=>new SHA224)),exports.sha256=e;
|
|
2
|
+
//# sourceMappingURL=sha256.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sha256.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js"],"sourcesContent":["import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map"],"names":["Maj","a","b","c","SHA256_K","Uint32Array","IV","SHA256_W","SHA256","SHA2","constructor","super","this","A","B","C","D","E","F","G","H","get","set","process","view","offset","i","getUint32","W15","W2","s0","rotr","s1","T1","T2","roundClean","fill","destroy","buffer","SHA224","outputLen","sha256","wrapConstructor"],"mappings":"yEAGA,MAEMA,IAAM,CAACC,EAAGC,EAAGC,IAAOF,EAAIC,EAAMD,EAAIE,EAAMD,EAAIC,EAI5CC,EAAW,IAAIC,YAAY,CAC7B,WAAY,WAAY,WAAY,WAAY,UAAY,WAAY,WAAY,WACpF,WAAY,UAAY,UAAY,WAAY,WAAY,WAAY,WAAY,WACpF,WAAY,WAAY,UAAY,UAAY,UAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UAAY,UACpF,UAAY,UAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UACpF,UAAY,UAAY,UAAY,UAAY,UAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,aAIlFC,EAAK,IAAID,YAAY,CACvB,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UAAY,aAIlFE,EAAW,IAAIF,YAAY,IACj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jB,WAAAE,GACIC,QACAC,KAAKC,GAAI,WACTD,KAAKE,EAAI,UACTF,KAAKG,EAAI,UACTH,KAAKI,GAAI,UACTJ,KAAKK,GAAI,QACTL,KAAKM,EAAI,WACTN,KAAKO,EAAI,WACTP,KAAKQ,GAAI,WACTR,KAAK4B,UAAY,EACrB,EAMQ,MAACC,EAASC,EAAAA,iBAAgB,IAAM,IAAIlC,SAC1BkC,EAAAA,iBAAgB,IAAM,IAAIH","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{SHA2 as t}from"./_sha2.esm.js";import{wrapConstructor as s,rotr as i}from"./utils.esm.js";const Maj=(t,s,i)=>t&s^t&i^s&i,h=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),e=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),r=new Uint32Array(64);class SHA256 extends t{constructor(){super(64,32,8,!1),this.A=0|e[0],this.B=0|e[1],this.C=0|e[2],this.D=0|e[3],this.E=0|e[4],this.F=0|e[5],this.G=0|e[6],this.H=0|e[7]}get(){const{A:t,B:s,C:i,D:h,E:e,F:r,G:n,H:o}=this;return[t,s,i,h,e,r,n,o]}set(t,s,i,h,e,r,n,o){this.A=0|t,this.B=0|s,this.C=0|i,this.D=0|h,this.E=0|e,this.F=0|r,this.G=0|n,this.H=0|o}process(t,s){for(let i=0;i<16;i++,s+=4)r[i]=t.getUint32(s,!1);for(let t=16;t<64;t++){const s=r[t-15],h=r[t-2],e=i(s,7)^i(s,18)^s>>>3,n=i(h,17)^i(h,19)^h>>>10;r[t]=n+r[t-7]+e+r[t-16]|0}let{A:e,B:n,C:o,D:A,E:c,F:l,G:H,H:u}=this;for(let t=0;t<64;t++){const s=u+(i(c,6)^i(c,11)^i(c,25))+((f=c)&l^~f&H)+h[t]+r[t]|0,a=(i(e,2)^i(e,13)^i(e,22))+Maj(e,n,o)|0;u=H,H=l,l=c,c=A+s|0,A=o,o=n,n=e,e=s+a|0}var f;e=e+this.A|0,n=n+this.B|0,o=o+this.C|0,A=A+this.D|0,c=c+this.E|0,l=l+this.F|0,H=H+this.G|0,u=u+this.H|0,this.set(e,n,o,A,c,l,H,u)}roundClean(){r.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const n=s((()=>new SHA256));s((()=>new SHA224));export{n as sha256};
|
|
2
|
+
//# sourceMappingURL=sha256.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sha256.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js"],"sourcesContent":["import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map"],"names":["Maj","a","b","c","SHA256_K","Uint32Array","IV","SHA256_W","SHA256","SHA2","constructor","super","this","A","B","C","D","E","F","G","H","get","set","process","view","offset","i","getUint32","W15","W2","s0","rotr","s1","T1","T2","roundClean","fill","destroy","buffer","SHA224","outputLen","sha256","wrapConstructor"],"mappings":"iGAGA,MAEMA,IAAM,CAACC,EAAGC,EAAGC,IAAOF,EAAIC,EAAMD,EAAIE,EAAMD,EAAIC,EAI5CC,EAAW,IAAIC,YAAY,CAC7B,WAAY,WAAY,WAAY,WAAY,UAAY,WAAY,WAAY,WACpF,WAAY,UAAY,UAAY,WAAY,WAAY,WAAY,WAAY,WACpF,WAAY,WAAY,UAAY,UAAY,UAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UAAY,UACpF,UAAY,UAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UACpF,UAAY,UAAY,UAAY,UAAY,UAAY,WAAY,WAAY,WACpF,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,aAIlFC,EAAK,IAAID,YAAY,CACvB,WAAY,WAAY,WAAY,WAAY,WAAY,WAAY,UAAY,aAIlFE,EAAW,IAAIF,YAAY,IACjC,MAAMG,eAAeC,EACjB,WAAAC,GACIC,MAAM,GAAI,GAAI,GAAG,GAGjBC,KAAKC,EAAY,EAARP,EAAG,GACZM,KAAKE,EAAY,EAARR,EAAG,GACZM,KAAKG,E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AY,EACrB,EAMQ,MAACC,EAASC,GAAgB,IAAM,IAAIlC,SAC1BkC,GAAgB,IAAM,IAAIH","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var t=require("./crypto.cjs.js");
|
|
2
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u8a=t=>t instanceof Uint8Array,e=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];if(!e)throw new Error("Non little-endian hardware is not supported");const r=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function utf8ToBytes(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function toBytes(t){if("string"==typeof t&&(t=utf8ToBytes(t)),!u8a(t))throw new Error("expected Uint8Array, got "+typeof t);return t}exports.Hash=class Hash{clone(){return this._cloneInto()}},exports.bytesToHex=function bytesToHex(t){if(!u8a(t))throw new Error("Uint8Array expected");let e="";for(let o=0;o<t.length;o++)e+=r[t[o]];return e},exports.concatBytes=function concatBytes(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let r=0;return t.forEach((t=>{if(!u8a(t))throw new Error("Uint8Array expected");e.set(t,r),r+=t.length})),e},exports.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),exports.hexToBytes=function hexToBytes(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let e=0;e<r.length;e++){const o=2*e,n=t.slice(o,o+2),s=Number.parseInt(n,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[e]=s}return r},exports.isLE=e,exports.randomBytes=function randomBytes(e=32){if(t.crypto&&"function"==typeof t.crypto.getRandomValues)return t.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")},exports.rotr=(t,e)=>t<<32-e|t>>>e,exports.toBytes=toBytes,exports.utf8ToBytes=utf8ToBytes,exports.wrapConstructor=function wrapConstructor(t){const hashC=e=>t().update(toBytes(e)).digest(),e=t();return hashC.outputLen=e.outputLen,hashC.blockLen=e.blockLen,hashC.create=()=>t(),hashC};
|
|
3
|
+
//# sourceMappingURL=utils.cjs.js.map
|