confium 0.7.0-aarch64-linux → 0.7.2-aarch64-linux
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 +59 -0
- data/Cargo.lock +222 -515
- data/README.adoc +1 -1
- data/lib/confium/transparency/ots.rb +42 -39
- data/lib/confium/transparency.rb +5 -5
- data/lib/confium/version.rb +1 -1
- data/lib/confium_native/3.1/confium_native.so +0 -0
- data/lib/confium_native/3.2/confium_native.so +0 -0
- data/lib/confium_native/3.3/confium_native.so +0 -0
- data/lib/confium_native/3.4/confium_native.so +0 -0
- data/lib/confium_native/4.0/confium_native.so +0 -0
- metadata +2 -2
data/README.adoc
CHANGED
|
@@ -103,7 +103,7 @@ end
|
|
|
103
103
|
=== `Confium::Transparency`
|
|
104
104
|
- `MerkleTree.new` / `#append(artifact_hash)` / `#root` / `#length` / `#empty?` / `#inclusion_proof(seq)`
|
|
105
105
|
- `InclusionProof#sequence` / `#steps` / `#verify(root)`
|
|
106
|
-
- `Ots.stamp(hash)` / `Ots.verify(
|
|
106
|
+
- `Ots.stamp(hash)` / `Ots.verify(proof)` / `Ots.upgrade(proof)` — real OpenTimestamps anchoring over the wire protocol (calendar HTTP, servers tried in order; the network round trip releases the GVL). `Ots::Client.new(servers)` for a custom pool; `Ots::Proof#verify` replays the op tree and classifies attestations. Network failures raise — there is no silent nil
|
|
107
107
|
|
|
108
108
|
=== `Confium::Composite` — PQ migration
|
|
109
109
|
- `.generate_ed25519_keypair` → `{ private_key:, public_key: }`
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Confium::Transparency::OTS — OpenTimestamps client
|
|
3
|
+
# Confium::Transparency::OTS — OpenTimestamps calendar client.
|
|
4
4
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# (TODO.completion/011-ots-ers-exposure.md).
|
|
5
|
+
# Real wire-protocol implementation over the native extension
|
|
6
|
+
# (confium-transparency 0.8.5+): stamps POST the 32-byte digest to a
|
|
7
|
+
# calendar server and parse the returned partial proof; verification
|
|
8
|
+
# replays the op tree from the digest and classifies attestations.
|
|
9
|
+
# Network failures raise (Confium::Transparency::OTS is backed by a
|
|
10
|
+
# real HTTP client) — there is no silent nil.
|
|
12
11
|
|
|
13
12
|
module Confium
|
|
14
13
|
module Transparency
|
|
@@ -20,44 +19,48 @@ module Confium
|
|
|
20
19
|
https://a.pool.eternitywall.com
|
|
21
20
|
].freeze
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
class << self
|
|
23
|
+
# Stamp a 32-byte digest via the default calendar pool.
|
|
24
|
+
# Returns a Proof (pending attestation — Bitcoin confirmation
|
|
25
|
+
# arrives later; poll with #upgrade).
|
|
26
|
+
#
|
|
27
|
+
# @param hash [String] 32-byte SHA-256 digest to anchor
|
|
28
|
+
# @return [Confium::Transparency::OTS::Proof]
|
|
29
|
+
# @raise [IOError, ArgumentError]
|
|
30
|
+
def stamp(hash)
|
|
31
|
+
default_client.stamp(hash)
|
|
32
|
+
end
|
|
27
33
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
# Verify a proof: replay its op tree from the digest and
|
|
35
|
+
# classify the attestations.
|
|
36
|
+
#
|
|
37
|
+
# @param proof [Proof, String] the proof (or raw .ots bytes —
|
|
38
|
+
# pass the digest alongside for the String form)
|
|
39
|
+
# @param digest [String, nil] required when proof is bytes
|
|
40
|
+
# @return [Hash] { pending: [uri], bitcoin: [height],
|
|
41
|
+
# litecoin: [height], anchored: bool }
|
|
42
|
+
def verify(proof, digest = nil)
|
|
43
|
+
proof = Proof.new(digest, proof) if digest && proof.is_a?(String)
|
|
44
|
+
proof.verify
|
|
31
45
|
end
|
|
32
46
|
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
# Upgrade a pending proof (fetch a more complete one).
|
|
48
|
+
#
|
|
49
|
+
# @return [Proof]
|
|
50
|
+
def upgrade(proof)
|
|
51
|
+
default_client.upgrade(proof)
|
|
35
52
|
end
|
|
36
|
-
end
|
|
37
53
|
|
|
38
|
-
|
|
39
|
-
# Returns a Receipt (stub: returns nil — requires network).
|
|
40
|
-
#
|
|
41
|
-
# @param hash [String] 32-byte SHA-256 hash to anchor
|
|
42
|
-
# @return [Receipt, nil]
|
|
43
|
-
def self.stamp(_hash)
|
|
44
|
-
# Real implementation: calls the Rust OTS client which
|
|
45
|
-
# submits the hash to calendar servers and returns a
|
|
46
|
-
# merged proof. Requires network access.
|
|
47
|
-
nil
|
|
48
|
-
end
|
|
54
|
+
private
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# @param receipt [Receipt, String] the OTS proof
|
|
54
|
-
# @param hash [String] the 32-byte hash
|
|
55
|
-
# @return [Boolean]
|
|
56
|
-
def self.verify(_receipt, _hash)
|
|
57
|
-
# Real implementation: calls the Rust OTS verifier which
|
|
58
|
-
# walks the Bitcoin blockchain proof.
|
|
59
|
-
false
|
|
56
|
+
def default_client
|
|
57
|
+
@default_client ||= Client.new(DEFAULT_CALENDARS)
|
|
58
|
+
end
|
|
60
59
|
end
|
|
60
|
+
|
|
61
|
+
# The native Client is defined by the extension
|
|
62
|
+
# (Confium::Transparency::OTS::Client) with #stamp / #upgrade;
|
|
63
|
+
# the Proof class carries #digest / #to_bytes / #verify.
|
|
61
64
|
end
|
|
62
65
|
end
|
|
63
66
|
end
|
data/lib/confium/transparency.rb
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
# The Transparency module itself is defined by the native Rust
|
|
6
6
|
# extension via magnus at require time. This file registers
|
|
7
7
|
# pure-Ruby autoloads for the Transparency submodules.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
# `require`, not `autoload`: the native extension defines the OTS
|
|
9
|
+
# constant at load time, which would shadow the autoload entry and
|
|
10
|
+
# keep this file from ever running — the Ruby-level convenience
|
|
11
|
+
# methods would silently vanish.
|
|
12
|
+
require 'confium/transparency/ots'
|
data/lib/confium/version.rb
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: confium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Open
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|