Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credential registry #241

Merged
merged 73 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
af1d8dd
Add initial version of the registry
annenkov Apr 4, 2023
6a1c19a
Add todos; rename get_keys to get_issuer_keys
annenkov Apr 4, 2023
16bc1d9
Add basic owner authorization
annenkov Apr 11, 2023
6aee7ce
Factor out sender_is_owner
annenkov Apr 11, 2023
50fb828
Add revocation authorization for holder; improve arbitrary for serial…
annenkov Apr 11, 2023
de2ab44
Refactoring: use ensure! instead of conditionals
annenkov Apr 12, 2023
6cacd62
Change key index to u8; factor out signature based authorization; add…
annenkov Apr 17, 2023
adc6c51
Add an entrypoint to view revocation key and nonce
annenkov Apr 17, 2023
03d91bd
Add events
annenkov Apr 17, 2023
73f0828
Renamed get to view
annenkov Apr 17, 2023
125a44e
Batch add/remove of public keys
annenkov Apr 17, 2023
8751e12
Use MetadataUrl from CIS2
annenkov Apr 18, 2023
81970d4
Restructure CredentialData; add more tests: get_status, add/view keys…
annenkov Apr 18, 2023
23ae17d
Docs for tests
annenkov Apr 18, 2023
4acbe04
Documentation
annenkov Apr 19, 2023
8a0876e
Test entrypoints; change commitments to Vec
annenkov Apr 19, 2023
ae12594
Add credential registry to CI
annenkov Apr 19, 2023
4b9b87b
Fix Uuidv4 parameter
annenkov Apr 19, 2023
48da920
Fix message in test
annenkov Apr 19, 2023
607a03a
Remove view state entrypoint
annenkov Apr 19, 2023
8353ddb
Remove files added by accident
annenkov Apr 21, 2023
94e9c4c
Apply suggestions from code review
annenkov Apr 21, 2023
ebbeaec
Address some review comments
annenkov Apr 24, 2023
de7857c
Suggestions
annenkov Apr 26, 2023
80cf865
Fix view_revocation_key return type; apply suggestions
annenkov Apr 26, 2023
88a73b3
Suggestions
annenkov Apr 26, 2023
ac8b482
Fix docs; add to readme
annenkov Apr 26, 2023
72305f1
Remove serialization schema; add separate CredentialEntryResponse for…
annenkov May 1, 2023
813c879
Derive PartialEq, Eq for MetadataUrl
annenkov May 1, 2023
e10521d
Fix clippy warning after @DOBEN suggestions
annenkov May 1, 2023
f65e78a
Split revoke entrypoint
annenkov May 2, 2023
7820cac
Remove updateCredential; use StateBox for CredentialData
annenkov May 2, 2023
ebccd1b
Comments for revocation parameters
annenkov May 2, 2023
e3b2fcb
Restructure input/response data structures; restructure credential da…
annenkov May 2, 2023
8dfacda
fix comments
annenkov May 2, 2023
a26133a
Use issuer instead of contract's owner
annenkov May 2, 2023
00d104b
Clarify a note
annenkov May 2, 2023
027715c
Clarify a note more
annenkov May 2, 2023
ba6c5c2
Fix signed message: add reason and revocation_key_index (depending on…
annenkov May 3, 2023
059994f
Add credential type and a schema registry; un-revoking (restoring) by…
annenkov May 8, 2023
8ad0fb1
Add schema updates; fix documentation
annenkov May 9, 2023
c3d93dc
Update docs
annenkov May 9, 2023
85f4a80
Use CredentialID instead of Uuidv4; keep it a u128 integer
annenkov May 9, 2023
f6f594a
Remove holder_restorable
annenkov May 9, 2023
1a1e66a
Apply suggestions from code review
annenkov May 10, 2023
f7c70b2
Merge branch 'main' into credential-registry
annenkov May 10, 2023
27c9fed
Address feedback; change field order in CredentialInfo and Credential…
annenkov May 10, 2023
c171a46
Rename RevokeReason to Reason, because it's used both in revoking and…
annenkov May 10, 2023
998ab6f
Add concordium-quickcheck feature to concordium-std dependency
annenkov May 11, 2023
a81f3b7
Remove getrandom
annenkov May 11, 2023
d2ac4d6
Rename secret key to private key
annenkov May 11, 2023
dd4f15f
Log restoration event
annenkov May 11, 2023
c118e72
Add credential restoration tests; log tagged events everywhere
annenkov May 11, 2023
7aab872
Merge branch 'main' into credential-registry
annenkov May 12, 2023
9f5b0f3
Fix clippy warnings
annenkov May 12, 2023
8683da2
Fix formatting
annenkov May 12, 2023
8b92390
Add serialization helpers
annenkov May 12, 2023
f1ed3cd
Add entry_point to SigningData
annenkov May 12, 2023
31e582b
Make newtype for CredentialType
annenkov May 12, 2023
4dfa36d
Fix docs
annenkov May 15, 2023
aaf293a
Merge branch 'main' into credential-registry
annenkov May 15, 2023
6453950
Add redection case in registerCredential; typos
annenkov May 15, 2023
9faba4b
Use u16 indices for public keys
annenkov May 16, 2023
0f60e45
Make valid_from non-optional
annenkov May 16, 2023
b2557de
Misc changes (#276)
abizjak May 23, 2023
ef8a2aa
Bump concordium std to 6.2, fix credential id type in schemas
annenkov May 23, 2023
f20b057
Fix docs
annenkov May 23, 2023
039f407
Update documentation; fix error for revocation key lookup
annenkov May 24, 2023
317e973
Change tag for Restore; add comments about event tagging
annenkov May 24, 2023
1eb19fe
Add revocation key event
annenkov May 24, 2023
dc0e68e
Merge branch 'main' into credential-registry
annenkov May 30, 2023
d9eefa3
Remove cis2 dependency; address comments
annenkov May 30, 2023
7a061fa
Add schema_ref to credential registration test
annenkov May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- examples/cis2-nft/Cargo.toml
- examples/cis3-nft-sponsored-txs/Cargo.toml
- examples/cis2-wccd/Cargo.toml
- examples/credential-registry/Cargo.toml
annenkov marked this conversation as resolved.
Show resolved Hide resolved
- examples/fib/Cargo.toml
- examples/icecream/Cargo.toml
- examples/memo/Cargo.toml
Expand Down Expand Up @@ -449,6 +450,7 @@ jobs:
- examples/nametoken/Cargo.toml
- examples/signature-verifier/Cargo.toml
- examples/cis3-nft-sponsored-txs/Cargo.toml
- examples/credential-registry/Cargo.toml

steps:
- name: Checkout sources
Expand Down Expand Up @@ -487,6 +489,7 @@ jobs:
- examples/cis2-nft/Cargo.toml
- examples/cis3-nft-sponsored-txs/Cargo.toml
- examples/cis2-wccd/Cargo.toml
- examples/credential-registry/Cargo.toml
- examples/fib/Cargo.toml
- examples/icecream/Cargo.toml
- examples/memo/Cargo.toml
Expand Down Expand Up @@ -615,6 +618,7 @@ jobs:
- examples/cis2-nft/Cargo.toml
- examples/cis3-nft-sponsored-txs/Cargo.toml
- examples/cis2-wccd/Cargo.toml
- examples/credential-registry/Cargo.toml
- examples/fib/Cargo.toml
- examples/icecream/Cargo.toml
- examples/memo/Cargo.toml
Expand Down
2 changes: 2 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ The list of contracts is as follows
- [voting](./voting) An example of how to conduct an election using a smart contract.
- [transfer-policy-check](./transfer-policy-check) A contract that showcases how to use policies.
- [eSealing](./eSealing) A contract implementing an eSealing service.
- [credential-registry](./credential-registry/) A contract for storing and managing public data of verifiable credentials.
- [sponsoredTransactions](./cis3-nft-sponsored-txs) A contract implementing the sponsored transaction mechanism (CIS3 standard).
- [smartContractUpgrade](./smart-contract-upgrade) An example of how to upgrade a smart contract. The state is migrated during the upgrade.
- [credentialRegistryStorageContract](./credential-registry-storage-contract) The contract is used for storing credentials for the Web3Id infrastructure.


30 changes: 30 additions & 0 deletions examples/credential-registry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package]
name = "credential_registry"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
authors = [ "Concordium <[email protected]>" ]
description = "An example credential registry smart contract"

[features]
default = ["std", "crypto-primitives", "wee_alloc"]
std = ["concordium-std/std", "concordium-cis2/std"]
wee_alloc = ["concordium-std/wee_alloc"]
crypto-primitives = ["concordium-std/crypto-primitives"]

[dependencies]
concordium-std = {path = "../../concordium-std", version="6.1", features = ["concordium-quickcheck"], default-features = false}
annenkov marked this conversation as resolved.
Show resolved Hide resolved
concordium-cis2 = {path = "../../concordium-cis2", version="3.0", default-features = false}
annenkov marked this conversation as resolved.
Show resolved Hide resolved
quickcheck = {version = "1.0.3"}
annenkov marked this conversation as resolved.
Show resolved Hide resolved

[dev-dependencies]
concordium-std = {path = "../../concordium-std", version="6.1"}
annenkov marked this conversation as resolved.
Show resolved Hide resolved

[lib]
crate-type=["cdylib", "rlib"]

[profile.release]
opt-level = "s"
codegen-units = 1
Loading