{"_id":"@attocash/commons-worker","_rev":"5-c1066af6e5e5dad2ebac5d866a3af7a0","name":"@attocash/commons-worker","dist-tags":{"latest":"8.0.0"},"versions":{"6.7.0":{"name":"@attocash/commons-worker","version":"6.7.0","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker@6.7.0","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"57839d87f72e15d8f985c920c52121bab639d22a","tarball":"https://registry.npmjs.org/@attocash/commons-worker/-/commons-worker-6.7.0.tgz","fileCount":6,"integrity":"sha512-gr+GVaqSDab6t4iR+0f0ETHUgEkW8ozcnQi0TU6uvv8l7BMLGTSQ6T+HLEcHhw3UrYDSpmLvRchAdAq7YwG0lw==","signatures":[{"sig":"MEYCIQDC0U5M9laVTTlPJ/wWRD0Me2AJaf0cGrGTlwVwQQYdjAIhAMi/QlOaVwiQHkghtkijLY4Z08joNm9PMla4SkxsSL16","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1408545},"main":"commons-commons-worker.mjs","_from":"file:commons-worker/build/packages/attocash-commons-worker-6.7.0.tgz","types":"commons-commons-worker.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-worker/build/packages/attocash-commons-worker-6.7.0.tgz","_integrity":"sha512-gr+GVaqSDab6t4iR+0f0ETHUgEkW8ozcnQi0TU6uvv8l7BMLGTSQ6T+HLEcHhw3UrYDSpmLvRchAdAq7YwG0lw==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker"},"_npmVersion":"10.9.7","description":"CPU proof-of-work worker implementation for Atto applications.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker_6.7.0_1779911979210_0.06954482069339263","host":"s3://npm-registry-packages-npm-production"}},"6.7.1":{"name":"@attocash/commons-worker","version":"6.7.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker@6.7.1","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"dc886bddf1f4f05e56cec63c006ffce66343ce94","tarball":"https://registry.npmjs.org/@attocash/commons-worker/-/commons-worker-6.7.1.tgz","fileCount":24,"integrity":"sha512-Rq63tL9fGk4h0A95BqytmZqid18u6XGVyEGSA5Lo94qFzHopNg9pB2kk+coz1uKFo1IUjIwtTU5dlRwGWKgBeQ==","signatures":[{"sig":"MEUCIQDjy7F9y4HD4deVOrUKCuE1cpdrnKhtphoSWiuI6WEhuwIgcmFQOFvWCrZydEa2zgAuV+XZ5zYAkOqiFEh4Cn3Ml3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1152627},"main":"commons-commons-worker.mjs","types":"commons-commons-worker.d.mts","gitHead":"1a3e41024f75a8372be02aab0eb9e6ed7b92d87f","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker"},"_npmVersion":"11.5.1","description":"CPU proof-of-work worker implementation for Atto applications.","directories":{},"_nodeVersion":"24.6.0","dependencies":{"@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1","@attocash/commons-core":"6.7.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker_6.7.1_1779996259715_0.6262217493344739","host":"s3://npm-registry-packages-npm-production"}},"6.7.1-patch.1":{"name":"@attocash/commons-worker","version":"6.7.1-patch.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker@6.7.1-patch.1","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"fe858459c955f89e91dd680e427d2d4773a9c810","tarball":"https://registry.npmjs.org/@attocash/commons-worker/-/commons-worker-6.7.1-patch.1.tgz","fileCount":8,"integrity":"sha512-4cWg7F8EmsJqSV+cno3sX9TxsbjzBFi8xW8RV5uGiaPqIGRbmWmOqRNEzxNUFYeUmGCtogFQr6iSqZG7Sf2Heg==","signatures":[{"sig":"MEYCIQDmXHwFf1YZm71bxFd0nYnG/uSVZl9y34dAukxvIm35EQIhAJKEPLnMEV+7hjkF/L99qRaFlZk6BP3283/41BZsUZRn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103587},"main":"commons-commons-worker.mjs","_from":"file:commons-worker/build/tmp/packJsPackage/attocash-commons-worker-6.7.1-patch.1.tgz","types":"commons-commons-worker.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-worker/build/tmp/packJsPackage/attocash-commons-worker-6.7.1-patch.1.tgz","_integrity":"sha512-4cWg7F8EmsJqSV+cno3sX9TxsbjzBFi8xW8RV5uGiaPqIGRbmWmOqRNEzxNUFYeUmGCtogFQr6iSqZG7Sf2Heg==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker"},"_npmVersion":"11.5.1","description":"CPU proof-of-work worker implementation for Atto applications.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1","@attocash/commons-core":"6.7.1-patch.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker_6.7.1-patch.1_1780002741496_0.7295642780197977","host":"s3://npm-registry-packages-npm-production"}},"7.0.2":{"name":"@attocash/commons-worker","version":"7.0.2","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker@7.0.2","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"2a41774c02cc2b5334eaab5b76174048925483f7","tarball":"https://registry.npmjs.org/@attocash/commons-worker/-/commons-worker-7.0.2.tgz","fileCount":10,"integrity":"sha512-MU2IZeJsR3UpCgpARImgpQysujcKWJ0T8mlmvBZ9w3wLWuN39R6HpVyAKYPrEaMHaQPv7+A/XRf54bSJ+K6AdA==","signatures":[{"sig":"MEUCIQCPSv32EcaeilIqfYSQSkS6ULD7S7SjwiSR3juXnWKKGAIgUGRsyjrShHa+YLFJVAlUsRH75GS9t/FnOfqBAQ7Ql4M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-worker@7.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":351657},"main":"commons-commons-worker.mjs","_from":"file:commons-worker/build/packages/attocash-commons-worker-7.0.2.tgz","types":"commons-commons-worker.d.mts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33103e8e-cafc-4b79-bf08-35e7b55bbbd0"}},"_resolved":"/home/runner/work/commons/commons/commons-worker/build/packages/attocash-commons-worker-7.0.2.tgz","_integrity":"sha512-MU2IZeJsR3UpCgpARImgpQysujcKWJ0T8mlmvBZ9w3wLWuN39R6HpVyAKYPrEaMHaQPv7+A/XRf54bSJ+K6AdA==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker"},"_npmVersion":"11.16.0","description":"CPU proof-of-work worker implementation for Atto applications.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"7.0.2","@attocash/commons-transport":"7.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker_7.0.2_1785094508329_0.08731272388672084","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"description":"CPU proof-of-work worker implementation for Atto applications.","homepage":"https://atto.cash","license":"BSD-3-Clause","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"bugs":{"url":"https://github.com/attocash/commons/issues"},"repository":{"type":"git","url":"git+https://github.com/attocash/commons.git","directory":"commons-worker"},"main":"commons-commons-worker.mjs","types":"commons-commons-worker.d.mts","version":"8.0.0","name":"@attocash/commons-worker","dependencies":{"@attocash/commons-core":"8.0.0","@attocash/commons-transport":"8.0.0","@noble/hashes":"2.2.0","@js-joda/core":"3.2.0"},"_id":"@attocash/commons-worker@8.0.0","_integrity":"sha512-ExloAxISa7+hACUeACEQZqGVjOo7YDMh4IAzvhXtplUUtWh0GEV7Xcg7McfwDACKeRf0w0VGB9bWJLtOnY83cg==","_resolved":"/home/runner/work/commons/commons/commons-worker/build/packages/attocash-commons-worker-8.0.0.tgz","_from":"file:commons-worker/build/packages/attocash-commons-worker-8.0.0.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-ExloAxISa7+hACUeACEQZqGVjOo7YDMh4IAzvhXtplUUtWh0GEV7Xcg7McfwDACKeRf0w0VGB9bWJLtOnY83cg==","shasum":"b3de561c7bbc406822f3f2d8e926efe3d18fe624","tarball":"https://registry.npmjs.org/@attocash/commons-worker/-/commons-worker-8.0.0.tgz","fileCount":10,"unpackedSize":351657,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-worker@8.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCwTQaOOWitJk9Abz4X1bmCbvxj2F1ui8TV+9ddz72EmgIgfUTtHIcvHQjMSo9mVqY2fwqD7FXIXyz2NvD7YmvcHJE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33103e8e-cafc-4b79-bf08-35e7b55bbbd0"}},"directories":{},"maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commons-worker_8.0.0_1788898440423_0.7913704035962288"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T19:59:39.017Z","modified":"2026-09-08T20:14:00.887Z","6.7.0":"2026-05-27T19:59:39.404Z","6.7.1":"2026-05-28T19:24:19.884Z","6.7.1-patch.1":"2026-05-28T21:12:21.641Z","7.0.2":"2026-07-26T19:35:08.473Z","8.0.0":"2026-09-08T20:14:00.587Z"},"bugs":{"url":"https://github.com/attocash/commons/issues"},"license":"BSD-3-Clause","homepage":"https://atto.cash","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"repository":{"type":"git","url":"git+https://github.com/attocash/commons.git","directory":"commons-worker"},"description":"CPU proof-of-work worker implementation for Atto applications.","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"readme":"# commons-worker\n\nCPU proof‑of‑work (PoW) implementation. Multiplatform (JVM/JS/Wasm). Useful for local development, tests, and\nenvironments without OpenCL.\n\nFeatures:\n\n- `AttoWorker.cpu()` factory (platform default parallelism)\n- `AttoWorker.cpu(parallelism: UShort)` to tune threads on JVM/JS\n- High‑level helpers: `work(block)` and `work(network, timestamp, target)`\n\n## Installation\n\nGradle:\n\n```kotlin\nimplementation(\"cash.atto:commons-worker:<version>\")\n```\n\nNPM:\n\n```sh\nnpm install @attocash/commons-core @attocash/commons-worker\n```\n\n## Basic usage\n\n```kotlin\nval worker = AttoWorker.cpu()\n\n// Work for a block (derives threshold and target internally)\nval work = worker.work(block)\n\n// Or explicitly with threshold/target\nval threshold = AttoWork.getThreshold(block.network, block.timestamp)\nval target = block.getTarget()\nval work2 = worker.work(threshold, target)\n\nworker.close()\n```\n\n## Tune parallelism (JVM)\n\n```kotlin\nval worker = AttoWorker.cpu(parallelism = 8U)\n```\n\nSee tests at `commons-worker/src/commonTest` and integration usages in `commons-core` tests.\n","readmeFilename":"README.md"}