Skip to content

Commit 0e4578f

Browse files
authored
Merge pull request #794 from axone-protocol/feat/axone-vc-scaffold-authority
✨ Feat/axone vc scaffold authority
2 parents 50e28f2 + 4cf51c7 commit 0e4578f

27 files changed

Lines changed: 1295 additions & 252 deletions

.github/skills/testing-coverage/SKILL.md

Lines changed: 317 additions & 252 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,49 @@ This foundation allows AXONE to go beyond simple transactions, enabling the exec
6565
</tr>
6666
</table>
6767

68+
### 🪪 Verifiable Credentials
69+
70+
> Smart Contracts designed to issue, track and verify verifiable credentials on-chain.
71+
72+
<table>
73+
<tr>
74+
<th rowspan="4" width="30%">
75+
<div align="center">
76+
<img alt="axone-vc logo" src="contracts/axone-vc/axone-vc-card.webp" width="150px"/>
77+
<div><b>axone-vc</b></div>
78+
<div>
79+
<sub><a href="contracts/axone-vc/README.md">→ Tech documentation</a></sub>
80+
</div>
81+
</th>
82+
</tr>
83+
<tr>
84+
<td>
85+
<a href="#-maturity">
86+
<img alt="status: initial" src="https://img.shields.io/badge/status-🥚-black?style=for-the-badge" />
87+
</a>
88+
<a href="https://crates.io/crates/axone-vc" target="_blank">
89+
<img alt="crates" src="https://img.shields.io/crates/v/axone-vc.svg?style=for-the-badge&color=orange"/>
90+
</a>
91+
</td>
92+
</tr>
93+
<tr>
94+
<td>
95+
<p>
96+
The <b>Verifiable Credential</b> contract of the protocol. It is intended to bind a credential authority to an <a href="https://docs.abstract.money/">Abstract Account (AA)</a> and manage credential lifecycle and verification.
97+
</p>
98+
<p>
99+
It targets RDF dataset-based credentials and provides the contract surface for submission, revocation, suspension, reinstatement and verification.
100+
</p>
101+
</td>
102+
</tr>
103+
<tr>
104+
<td>
105+
<img alt="type: credential" src="https://img.shields.io/badge/type-🪪%20credential-seagreen?style=for-the-badge" />
106+
<img alt="kind: rdf" src="https://img.shields.io/badge/kind-🕸️%20rdf-lightskyblue?style=for-the-badge" />
107+
</td>
108+
</tr>
109+
</table>
110+
68111
## 🥚 Maturity
69112

70113
The maturity of each contract is indicated by the following emojis.

contracts/axone-gov/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ abstract-app = { workspace = true, features = ["test-utils"] }
7373
abstract-client.workspace = true
7474
axone-gov = { path = ".", features = ["mock-logic-query"] }
7575
serde.workspace = true
76+
77+
[package.metadata.cargo-machete]
78+
ignored = ["serde"]

contracts/axone-vc/Cargo.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[package]
2+
authors = { workspace = true }
3+
description = "AXONE verifiable credential contract built with Abstract SDK."
4+
edition = { workspace = true }
5+
homepage = { workspace = true }
6+
keywords = { workspace = true }
7+
license = { workspace = true }
8+
name = "axone-vc"
9+
repository = { workspace = true }
10+
rust-version = { workspace = true }
11+
version = "0.1.0"
12+
13+
exclude = ["contract.wasm", "hash.txt"]
14+
15+
[lib]
16+
crate-type = ["cdylib", "rlib"]
17+
18+
[[bin]]
19+
name = "schema"
20+
required-features = ["schema"]
21+
22+
[[bin]]
23+
name = "publish"
24+
required-features = ["daemon-bin"]
25+
26+
[[bin]]
27+
name = "install"
28+
required-features = ["daemon-bin"]
29+
30+
[features]
31+
daemon-bin = [
32+
"cw-orch/daemon",
33+
"dep:clap",
34+
"dep:abstract-client",
35+
"dep:axone-networks",
36+
"dep:dotenv",
37+
"dep:env_logger",
38+
"dep:log",
39+
]
40+
default = ["export"]
41+
export = []
42+
library = []
43+
schema = ["abstract-app/schema"]
44+
45+
[dependencies]
46+
abstract-app.workspace = true
47+
abstract-client = { workspace = true, optional = true }
48+
abstract-interface.workspace = true
49+
axone-networks = { path = "../../packages/axone-networks", version = "0.1.0", optional = true }
50+
bech32 = "0.11.0"
51+
clap = { workspace = true, optional = true, features = ["derive"] }
52+
const_format.workspace = true
53+
cosmwasm-schema.workspace = true
54+
cosmwasm-std.workspace = true
55+
cw-orch.workspace = true
56+
cw-storage-plus.workspace = true
57+
dotenv = { workspace = true, optional = true }
58+
env_logger = { workspace = true, optional = true }
59+
log = { workspace = true, optional = true }
60+
serde = { workspace = true, features = ["derive"] }
61+
thiserror.workspace = true
62+
63+
[dev-dependencies]
64+
abstract-app = { workspace = true, features = ["test-utils"] }
65+
abstract-client.workspace = true
66+
axone-vc = { path = "." }
67+
serde.workspace = true
68+
69+
[package.metadata.cargo-machete]
70+
ignored = ["serde"]

contracts/axone-vc/Makefile.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tasks.generate_schema]
2+
args = ["run", "--bin", "schema", "--features", "schema"]
3+
command = "cargo"
4+
5+
[tasks.schema]
6+
dependencies = ["generate_schema"]
7+
script = '''
8+
SCHEMA_FILE="schema/module-schema.json"
9+
10+
if [ ! -f "${SCHEMA_FILE}" ]; then
11+
echo "❌ Unable to locate ${SCHEMA_FILE}"
12+
exit 1
13+
fi
14+
15+
TITLE=$(jq -r '.name // "Axone Contract"' metadata.json)
16+
DESCRIPTION=$(cat README.md)
17+
18+
jq --arg title "$TITLE" --arg description "$DESCRIPTION" \
19+
'. + {contract_name: $title, title: $title, description: $description}' \
20+
"${SCHEMA_FILE}" > "${SCHEMA_FILE}.tmp" && mv "${SCHEMA_FILE}.tmp" "${SCHEMA_FILE}"
21+
'''

contracts/axone-vc/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AXONE Verifiable Credential Contract (`axone-vc`)
2+
3+
The AXONE Verifiable Credential contract attaches **verifiable credential capabilities**
4+
to a resource represented by an **Abstract Account (AA)**.
5+
6+
It is the AXONE contract responsible for binding a credential authority to that resource
7+
and structuring the credential lifecycle around submission, revocation, suspension,
8+
reinstatement and verification.
9+
10+
It targets credentials represented as RDF datasets.
11+
12+
## Authority
13+
14+
The contract exposes the identifier of the credential authority through the `Authority`
15+
query.
16+
17+
This identifier is the DID of the resource bound to the host Abstract Account for this
18+
VC capability.
19+
20+
The current representation uses the `did:pkh` method and is grounded in the on-chain
21+
address of the host Abstract Account, rendered as a CAIP-compatible canonical Cosmos
22+
Bech32 account address.
23+
24+
Form:
25+
26+
`did:pkh:cosmos:<chain_id>:cosmos1...`
19.2 KB
Loading

contracts/axone-vc/metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "AxoneVc",
3+
"description": "Verifiable credential app scaffold.",
4+
"website": "",
5+
"docs": "",
6+
"type": "app",
7+
"icon": "GiRibbonMedal",
8+
"enabled": true
9+
}

contracts/axone-vc/pyproject.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[tool.semantic_release]
2+
commit_message = "chore(release): axone-vc {version}"
3+
commit_parser = "conventional-monorepo"
4+
major_on_zero = false
5+
tag_format = "axone-vc-v{version}"
6+
version_toml = ["Cargo.toml:package.version"]
7+
8+
[tool.semantic_release.commit_parser_options]
9+
path_filters = ["contracts/axone-vc/**", "Cargo.toml", "Cargo.lock"]
10+
11+
[tool.semantic_release.branches.main]
12+
match = "main"
13+
prerelease = false
14+
prerelease_token = "rc"
15+
16+
[tool.semantic_release.changelog]
17+
exclude_commit_patterns = []
18+
mode = "update"
19+
20+
[tool.semantic_release.changelog.default_templates]
21+
changelog_file = "CHANGELOG.md"
22+
23+
[tool.semantic_release.publish]
24+
dist_glob_patterns = [
25+
"../../target/wasm32-unknown-unknown/release/axone_vc.wasm",
26+
]
27+
upload_to_vcs_release = true
28+
29+
[tool.semantic_release.remote]
30+
type = "github"
31+
32+
[tool.semantic_release.remote.token]
33+
env = "GH_TOKEN"

0 commit comments

Comments
 (0)