active_hashcash 0.6.1 → 0.6.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/assets/javascripts/hashcash.js +4 -4
- data/lib/active_hashcash/engine.rb +0 -2
- data/lib/active_hashcash/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5e43f6be8372678e15c9a19647a195a37d52a2b1fe8de8f3bf51847dfd513b6
|
|
4
|
+
data.tar.gz: c54df83ac36629327f1bf23b125c1726133cc652c32e271e216e53a57ff4fbe9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42ff8c4e0ad05d8675c2f8e48b5ca234c230657725488fbfa0abecf43e6d81d7d66210ac285b5b0baa5d2f2f25b0a86e0cd54f2816b50a86b37a63333ded9cff
|
|
7
|
+
data.tar.gz: d964f60754e9b823ec7e54b577498f9245fbb855aa1c2b33db0a97236faac73895b1f38c11a9420c78236ab0b8f4b69e79c50cb6d9a2fe30bfbd459aa74a4154
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog of ActiveHashcash
|
|
2
2
|
|
|
3
|
+
## 0.6.2 (2026-11-13)
|
|
4
|
+
|
|
5
|
+
- Fix #25 Stop adding lib/ to asset paths so Propshaft doesn't publish Ruby sources (@Spone)
|
|
6
|
+
- Fix #24 Web Worker breaking when hashcash.js is minified by renaming the outer `self` variable so worker `self` stays a free reference (@Spone)
|
|
7
|
+
|
|
3
8
|
## 0.6.1 (2026-11-11)
|
|
4
9
|
|
|
5
10
|
- Reject non-canonical stamps so one proof of work cannot be spent multiple times (@schmijos)
|
|
@@ -150,7 +150,7 @@ Hashcash.Stamp.prototype.stopClock = function() {
|
|
|
150
150
|
// because it avoids the per-call Promise/microtask overhead entirely.
|
|
151
151
|
Hashcash.Stamp.prototype.work = function(callback) {
|
|
152
152
|
this.startClock()
|
|
153
|
-
var
|
|
153
|
+
var stamp = this
|
|
154
154
|
|
|
155
155
|
var workerCode = function() {
|
|
156
156
|
// SHA-256 round constants (FIPS 180-4 §4.2.2)
|
|
@@ -297,11 +297,11 @@ Hashcash.Stamp.prototype.work = function(callback) {
|
|
|
297
297
|
if (e.data.found) {
|
|
298
298
|
Hashcash._worker = null
|
|
299
299
|
Hashcash._workerUrl = null
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
stamp.counter = e.data.counter
|
|
301
|
+
stamp.stopClock()
|
|
302
302
|
worker.terminate()
|
|
303
303
|
URL.revokeObjectURL(workerUrl)
|
|
304
|
-
callback(
|
|
304
|
+
callback(stamp)
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|