Skip to content

Commit d43bdc7

Browse files
author
Joshua Mir
committed
aggregate types
1 parent bca0c5b commit d43bdc7

File tree

1 file changed

+67
-40
lines changed

1 file changed

+67
-40
lines changed

types.json

+67-40
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,85 @@
11
{
22
"Address": "AccountId",
33
"LookupSource": "AccountId",
4-
"Node": {
5-
"index": "u64",
6-
"hash": "H256",
7-
"size": "u64"
4+
"RoleValue": "Option<u32>",
5+
"Public": "[u8; 32]",
6+
"ChunkIndex": "u64",
7+
"FeedId": "u32",
8+
"UserId": "u32",
9+
"ContractId": "u32",
10+
"ChallengeId": "u32",
11+
"PlanId": "u32",
12+
"AttestationId": "u32",
13+
"NoiseKey": "Vec<u8>",
14+
"FeedKey": "Public",
15+
"Ranges": "Vec<(C, C)>",
16+
"Nonce": "u64",
17+
"Role": {
18+
"_enum": [
19+
"Encoder",
20+
"Hoster",
21+
"Attestor"
22+
]
823
},
9-
"Proof": {
10-
"index": "u64",
11-
"nodes": "Vec<Node>",
12-
"signature": "Option<Signature>"
24+
"User": {
25+
"id": "UserId",
26+
"address": "AccountId",
27+
"noise_key": "Option<NoiseKey>"
1328
},
14-
"ChunkHashPayload": {
15-
"hash_type": "u8",
16-
"chunk_length": "u64",
17-
"chunk_content": "Vec<u8>"
18-
},
19-
"ParentHashPayload": {
20-
"hash_type": "u8",
21-
"total_length": "u64",
22-
"child_hashes": "[H256; 2]"
29+
"Feed": {
30+
"id": "FeedId",
31+
"publickey": "FeedKey",
32+
"meta": "TreeRoot"
2333
},
2434
"ParentHashInRoot": {
2535
"hash": "H256",
2636
"hash_number": "u64",
2737
"total_length": "u64"
2838
},
29-
"TreeHashPayload": {
39+
"TreeRoot": {
40+
"signature": "H512",
3041
"hash_type": "u8",
3142
"children": "Vec<ParentHashInRoot>"
3243
},
33-
"Attestation": {
34-
"location": "u8",
35-
"latency": "Option<u8>"
44+
"TreeHashPayload": {
45+
"hash_type": "u8",
46+
"children": "Vec<ParentHashInRoot>"
3647
},
37-
"ChallengeAttestations": {
38-
"expected_attestors": "Vec<u64>",
39-
"expected_friends": "Vec<u64>",
40-
"completed": "Vec<(u64, Attestation)>"
48+
"Plan": {
49+
"id": "PlanId",
50+
"feed": "FeedId",
51+
"publisher": "UserId",
52+
"ranges": "Ranges<ChunkIndex>"
4153
},
42-
"HostedArchive": {
43-
"encoded": "Vec<(u64,(u64, u64))>",
44-
"encoding": "Vec<(u64,(u64, u64))>",
45-
"state": "BTreeMap<u64, Challenge>"
54+
"Contract": {
55+
"id": "ContractId",
56+
"plan": "PlanId",
57+
"ranges": "Ranges<ChunkIndex>",
58+
"encoder": "UserId",
59+
"hoster": "UserId"
4660
},
4761
"Challenge": {
48-
"_enum": {
49-
"Active": "u64",
50-
"Attesting": "ChallengeAttestation"
51-
}
52-
},
53-
"DatIdIndex": "u64",
54-
"DatIdVec": "Vec<DatIdIndex>",
55-
"UserIdIndex": "u64",
56-
"DatSize": "u64",
57-
"Public": "[u8; 32]"
58-
}
62+
"id": "ChallengeId",
63+
"contract": "ContractId",
64+
"chunks": "Vec<ChunkIndex>"
65+
},
66+
"Node": {
67+
"index": "u64",
68+
"hash": "H256",
69+
"size": "u64"
70+
},
71+
"Proof": {
72+
"index": "u64",
73+
"nodes": "Vec<Node>",
74+
"signature": "Option<Signature>"
75+
},
76+
"Attestation": {
77+
"id": "AttestationId",
78+
"attestor": "UserId",
79+
"contract": "ContractId"
80+
},
81+
"Report": {
82+
"location": "u8",
83+
"latency": "Option<u8>"
84+
}
85+
}

0 commit comments

Comments
 (0)