| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 01:05:20 GMT
X-Served-By: cache-dfw-kdal2120067-DFW, cache-bom-vanm7210037-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768698319.487521,VS0,VE779
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
trust-chain: An implementation of a trust chain
trust-chain: An implementation of a trust chain
Downloads
- trust-chain-0.1.3.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.2.0, 0.1.3.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.6 && <5), binary (>=0.8 && <1), bytestring (>=0.11 && <1), containers (>=0.6 && <1), cropty (>=0.3), merge (>=0.3), network (>=3.1 && <4), text (>=1.2 && <2) [details] |
| License | MIT |
| Author | Samuel Schlesinger |
| Maintainer | sgschlesinger@gmail.com |
| Uploaded | by sgschlesinger at 2021-09-19T08:24:46Z |
| Category | Cryptography, Crypto |
| Source repo | head: git clone https://github.com/samuelschlesinger/trust-chain |
| Distributions | |
| Downloads | 700 total (24 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2021-09-19 [all 1 reports] |
Readme for trust-chain-0.1.3.0
[back to package description]Trust Chain
An implementation of a trust chain parameterized on structure and content. As an example:
type Time = Integer
data Person = Person
{ pubKey :: PublicKey
, legalName :: Maybe Text
, emails :: Set Text
, posts :: Set (Time, Text)
}
deriving (Eq, Ord, Binary, Generic)
mergePerson :: Merge [String] Person Person
mergePerson =
Person
<$> required pubKey
<*> optional legalName
<*> combine emails
<*> combine posts
person :: IO ()
person = do
privateKey0 <- generatePrivateKey KeySize256
privateKey1 <- generatePrivateKey KeySize256
let myself = Person (privateToPublic privateKey0) (Just "Samuel Schlesinger") (Set.fromList ["sgschlesinger@gmail.com", "samuel@simspace.com"]) (Set.fromList [])
let myfriend = Person (privateToPublic privateKey1) (Just "My Friend") (Set.fromList ["friend@friendly.com"]) Set.empty
let partialfriend = Person (privateToPublic privateKey1) Nothing Set.empty Set.empty
tc0 <- mkTrustProxy privateKey0 [Trustless myself, Trustless partialfriend]
tc1 <- mkTrustProxy privateKey1 [Trustless myfriend]
tc0' <- mkTrustProxy privateKey0 [tc0, tc1]
tc1' <- mkTrustProxy privateKey1 [tc0, tc1]
requires "person"
[ assignments pubKey mergePerson (claims tc1') == assignments pubKey mergePerson (claims tc0')
, assignments pubKey mergePerson (claims tc0') == Right (Map.fromList [(privateToPublic privateKey0, myself), (privateToPublic privateKey1, myfriend)])
]