@attestify/cli 0.1.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.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @attestify/cli
2
+
3
+ Command-line tool for interacting with the Attestify protocol on Hedera testnet.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ # From hedera/ root
9
+ pnpm install
10
+
11
+ # Build the CLI
12
+ pnpm --filter @attestify/cli build
13
+ ```
14
+
15
+ Set your credentials via environment variables or a `.env` file:
16
+
17
+ ```bash
18
+ export HEDERA_ACCOUNT_ID=0.0.12345
19
+ export HEDERA_PRIVATE_KEY=your_ecdsa_private_key_hex
20
+ ```
21
+
22
+ ## Commands
23
+
24
+ All commands target Hedera testnet by default. Append `--json` to any command for JSON output.
25
+
26
+ ### Schema
27
+
28
+ ```bash
29
+ # Register a schema
30
+ attestify schema create --definition "string name, uint256 score, bool passed" --revocable
31
+
32
+ # Register from a JSON file
33
+ attestify schema create --file schema.json
34
+
35
+ # Fetch a schema by UID
36
+ attestify schema fetch --uid 0xabc123...
37
+ ```
38
+
39
+ ### Attestation
40
+
41
+ ```bash
42
+ # Create an attestation
43
+ attestify attestation create \
44
+ --schema-uid 0xabc123... \
45
+ --subject 0x1234...abcd \
46
+ --data 0x... \
47
+ --expiration 0
48
+
49
+ # Create from a JSON file
50
+ attestify attestation create --file attestation.json
51
+
52
+ # Fetch an attestation
53
+ attestify attestation fetch --uid 0xdef456...
54
+
55
+ # Revoke an attestation
56
+ attestify attestation revoke --uid 0xdef456...
57
+ ```
58
+
59
+ ### Authority
60
+
61
+ ```bash
62
+ # Register as an authority
63
+ attestify authority register --metadata "My Organization"
64
+
65
+ # Fetch authority info
66
+ attestify authority fetch --address 0x1234...abcd
67
+ ```
68
+
69
+ ## JSON Output
70
+
71
+ Use `--json` for machine-readable output:
72
+
73
+ ```bash
74
+ attestify schema fetch --uid 0xabc123... --json
75
+ ```
76
+
77
+ Success responses return the data object. Error responses include `type` and `message` fields.
78
+
79
+ ## License
80
+
81
+ MIT