{"_id":"@attocash/commons-worker-web","_rev":"6-6b99723e61bf7bfaebf79f28265ad0e2","name":"@attocash/commons-worker-web","dist-tags":{"latest":"8.0.2"},"versions":{"6.7.0":{"name":"@attocash/commons-worker-web","version":"6.7.0","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker-web@6.7.0","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"1968446ad84c422bcae406f1d13dc2debb7feffd","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-6.7.0.tgz","fileCount":6,"integrity":"sha512-aeqIsjDMBZ4JmHXEKtfrhZ83VX1sVlP602Rvjl6ADYAidcPaRsGOeaKy3WET6+DxWfkZJpLNWfkBV7LmXRScfA==","signatures":[{"sig":"MEUCIHlMYciCkqHl/SlDFvAyL4C1XsMn54CEzf38Ds4QXLudAiEAkolA+fx6PAzTrFnyZbZnioZOooIkx+YToOV2+r8vLzM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1409349},"main":"commons-commons-worker-web.mjs","_from":"file:commons-worker-web/build/packages/attocash-commons-worker-web-6.7.0.tgz","types":"commons-commons-worker-web.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-worker-web/build/packages/attocash-commons-worker-web-6.7.0.tgz","_integrity":"sha512-aeqIsjDMBZ4JmHXEKtfrhZ83VX1sVlP602Rvjl6ADYAidcPaRsGOeaKy3WET6+DxWfkZJpLNWfkBV7LmXRScfA==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"_npmVersion":"10.9.7","description":"Browser WebGPU and WebGL proof-of-work workers 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-web_6.7.0_1779911985016_0.3966265982838644","host":"s3://npm-registry-packages-npm-production"}},"6.7.1":{"name":"@attocash/commons-worker-web","version":"6.7.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker-web@6.7.1","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"bab22c60911086abad4f3df19c836a3e2dd11f9b","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-6.7.1.tgz","fileCount":24,"integrity":"sha512-jWr0G+GJ+HWtamBNYV9tY7CpsEX1VWiD31qbjiLC9IHtvCM1t6C+K1ki3OaLcMS0h0TlCHmNq2C5pKOadkb7ww==","signatures":[{"sig":"MEUCIQCAE1XFBWNEFlperW+BtS0XL8NQQMjRADa6fvUWdXGBagIgC8phtKpbhFEEINjkuu5cXSZwWEwsBgT+0BxEJYDVB/E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1149631},"main":"commons-commons-worker-web.mjs","types":"commons-commons-worker-web.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-web"},"_npmVersion":"11.5.1","description":"Browser WebGPU and WebGL proof-of-work workers 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-worker":"6.7.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker-web_6.7.1_1779996268410_0.14255223019657381","host":"s3://npm-registry-packages-npm-production"}},"6.7.1-patch.1":{"name":"@attocash/commons-worker-web","version":"6.7.1-patch.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker-web@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":"9ee95eb1f5d83155df32af9159476ae040a1d4ee","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-6.7.1-patch.1.tgz","fileCount":8,"integrity":"sha512-koqgF9kvhBfA/h4XWRT/9xVHtf2qbYKwKmFMXYNsHg66ScruUOgaU1IHMngjTSS3C2wmQ9x/hPOkLMpqpzkAmA==","signatures":[{"sig":"MEUCIBKy92+1Cv74EBajNuyXQMrILDzXHIV6AoYKkPdB6WZMAiEA1Zwkxd6cfbp/84ppfbjUtVwwhqjqJ7JaHmeGGkvqF7c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67754},"main":"commons-commons-worker-web.mjs","_from":"file:commons-worker-web/build/tmp/packJsPackage/attocash-commons-worker-web-6.7.1-patch.1.tgz","types":"commons-commons-worker-web.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-worker-web/build/tmp/packJsPackage/attocash-commons-worker-web-6.7.1-patch.1.tgz","_integrity":"sha512-koqgF9kvhBfA/h4XWRT/9xVHtf2qbYKwKmFMXYNsHg66ScruUOgaU1IHMngjTSS3C2wmQ9x/hPOkLMpqpzkAmA==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"_npmVersion":"11.5.1","description":"Browser WebGPU and WebGL proof-of-work workers 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","@attocash/commons-worker":"6.7.1-patch.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker-web_6.7.1-patch.1_1780002746770_0.9257221530571775","host":"s3://npm-registry-packages-npm-production"}},"7.0.2":{"name":"@attocash/commons-worker-web","version":"7.0.2","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker-web@7.0.2","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"d22fc96e7e879650809399590f7c3258cc1505be","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-7.0.2.tgz","fileCount":10,"integrity":"sha512-wD+4+10nsTnchgpb7OyQ7bh5roLDcKa1YMr+8Uw81XUFf275IU9dKH6cg+VYfXUrCoYveHAPbsL3DHWaSnw6ig==","signatures":[{"sig":"MEUCIQDKUxjEbCRhdR7up5LNTHPU1IZVfA6AagA0f9dAxYFefQIgJPfjB7ym8/Nvhxw7yRnKVh1S0A8pHZiwW/hqavC1Yew=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-worker-web@7.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":316143},"main":"commons-commons-worker-web.mjs","_from":"file:commons-worker-web/build/packages/attocash-commons-worker-web-7.0.2.tgz","types":"commons-commons-worker-web.d.mts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fcc62103-64ad-4747-b3c4-aa156ca23c91"}},"_resolved":"/home/runner/work/commons/commons/commons-worker-web/build/packages/attocash-commons-worker-web-7.0.2.tgz","_integrity":"sha512-wD+4+10nsTnchgpb7OyQ7bh5roLDcKa1YMr+8Uw81XUFf275IU9dKH6cg+VYfXUrCoYveHAPbsL3DHWaSnw6ig==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"_npmVersion":"11.16.0","description":"Browser WebGPU and WebGL proof-of-work workers 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-worker":"7.0.2","@attocash/commons-transport":"7.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker-web_7.0.2_1785094504740_0.31171082826603236","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"name":"@attocash/commons-worker-web","version":"8.0.0","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-worker-web@8.0.0","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"bf10d98aa053ea8effa53ab01f6c603c94345601","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-8.0.0.tgz","fileCount":10,"integrity":"sha512-h4d5kBArg17eISqH7qPrm0XBBDtOJ08VKf9hwVMOd5L2u7N/BUKhB7OwmmZ4lfR9yNaPgj64TyWM0aJCYfy0bQ==","signatures":[{"sig":"MEQCIDdzdeKuX7LlBFs2wkc5Pq5K8UFieO1CfL8dzsD509aVAiAyNSc+Vzh8SwScwAGKNXCgjq3RV3gIhoyHMKVBesZNLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-worker-web@8.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":316143},"main":"commons-commons-worker-web.mjs","_from":"file:commons-worker-web/build/packages/attocash-commons-worker-web-8.0.0.tgz","types":"commons-commons-worker-web.d.mts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fcc62103-64ad-4747-b3c4-aa156ca23c91"}},"_resolved":"/home/runner/work/commons/commons/commons-worker-web/build/packages/attocash-commons-worker-web-8.0.0.tgz","_integrity":"sha512-h4d5kBArg17eISqH7qPrm0XBBDtOJ08VKf9hwVMOd5L2u7N/BUKhB7OwmmZ4lfR9yNaPgj64TyWM0aJCYfy0bQ==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"_npmVersion":"11.19.0","description":"Browser WebGPU and WebGL proof-of-work workers for Atto applications.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"8.0.0","@attocash/commons-worker":"8.0.0","@attocash/commons-transport":"8.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-worker-web_8.0.0_1788898435874_0.921527660019559","host":"s3://npm-registry-packages-npm-production"}},"8.0.2":{"_id":"@attocash/commons-worker-web@8.0.2","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"9242b5ece2685d8d078e6a0d7d80f6328087a0bd","tarball":"https://registry.npmjs.org/@attocash/commons-worker-web/-/commons-worker-web-8.0.2.tgz","fileCount":10,"integrity":"sha512-zqDUz9u6RAQBCBBGzuqSa4SCmEWKDQ8BXMI+7U3SkD2hn8p72B9SCSYlleBdvZjyAqAXT3yXsxqpwOe6LALuuw==","signatures":[{"sig":"MEQCICIn55BYA/jivr1e9d3Kw0AQExtE1WssNSKBpSglr3PDAiA9Ynj3HXClw/WGVz91HpLCPGem91YeLG5TqLTi5tnRvg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCpPs/ZONAcN8GlAuVgPYKX44a8E2YWhZIRveMsEtqdewIhALqTaEAzR3R0BhIqIOvhcQj5W2B0DzXoX2fEB8DxpZYC"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-worker-web@8.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":360297},"main":"commons-commons-worker-web.mjs","name":"@attocash/commons-worker-web","_from":"file:commons-worker-web/build/packages/attocash-commons-worker-web-8.0.2.tgz","types":"commons-commons-worker-web.d.mts","license":"BSD-3-Clause","version":"8.0.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"fcc62103-64ad-4747-b3c4-aa156ca23c91"}},"homepage":"https://atto.cash","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"_resolved":"/home/runner/work/commons/commons/commons-worker-web/build/packages/attocash-commons-worker-web-8.0.2.tgz","_integrity":"sha512-zqDUz9u6RAQBCBBGzuqSa4SCmEWKDQ8BXMI+7U3SkD2hn8p72B9SCSYlleBdvZjyAqAXT3yXsxqpwOe6LALuuw==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"_npmVersion":"11.19.0","description":"Browser WebGPU and WebGL proof-of-work workers for Atto applications.","directories":{},"maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"_nodeVersion":"24.21.0","dependencies":{"@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"8.0.2","@attocash/commons-worker":"8.0.2","@attocash/commons-transport":"8.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commons-worker-web_8.0.2_1790705936383_0.8274083148675773"}}},"time":{"created":"2026-05-27T19:59:44.875Z","modified":"2026-09-29T18:18:56.859Z","6.7.0":"2026-05-27T19:59:45.165Z","6.7.1":"2026-05-28T19:24:28.587Z","6.7.1-patch.1":"2026-05-28T21:12:26.919Z","7.0.2":"2026-07-26T19:35:04.890Z","8.0.0":"2026-09-08T20:13:56.028Z","8.0.2":"2026-09-29T18:18:56.533Z"},"bugs":{"url":"https://github.com/attocash/commons/issues"},"license":"BSD-3-Clause","homepage":"https://atto.cash","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-worker-web"},"description":"Browser WebGPU and WebGL proof-of-work workers for Atto applications.","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"readme":"# commons-worker-web\n\nWeb proof-of-work (PoW) implementations for browser JavaScript and Wasm. WebGPU uses a WGSL compute shader; WebGL uses a\nWebGL2 fragment shader over nonce batches. Both return the same `AttoWorker` interface as CPU/remote workers.\n\n- JavaScript browser and Wasm browser targets\n- WebGPU requires WebGPU support in a secure context\n- WebGL requires WebGL2 with integer render target support\n- Batches dispatches to avoid long single-shader runs\n- Same validation contract as the CPU worker\n\n## Installation\n\nGradle:\n\n```kotlin\nimplementation(\"cash.atto:commons-worker-web:<version>\")\n```\n\nNPM:\n\n```sh\nnpm install @attocash/commons-core @attocash/commons-worker @attocash/commons-worker-web\n```\n\n## Usage\n\n```kotlin\nif (!AttoWorker.isWebSupported()) {\n  return\n}\n\nval worker = AttoWorker.web()\nval work = worker.work(block)\n\nworker.close()\n```\n\nNotes:\n\n- `AttoWorker.web()` selects WebGPU when available, then falls back to WebGL.\n- `AttoWorker.isWebSupported()` checks whether either web worker backend is available.\n- Browser WebGPU availability depends on browser version, platform, GPU driver, and secure-context rules.\n- `AttoWorker.isWebgpuSupported()` checks the WebGPU API surface and asynchronous adapter discovery.\n- `AttoWorker.isWebglSupported()` checks the WebGL2 API surface needed by the fragment-shader worker.\n- Browser tests skip the actual GPU work when the required GPU API is not exposed by the test browser.\n- Browser tests use the shared root Puppeteer-backed Karma launcher. Kotlin/JS installs npm packages with lifecycle\n  scripts ignored, so `installPuppeteerBrowsers` runs Puppeteer's browser installer explicitly before browser tests.\n- Kotlinx benchmark is not configured for this module because its Kotlin/JS runner requires `nodejs()`, while this\n  worker is browser-only.\n","readmeFilename":"README.md"}