Skip to content

Commit 8359f94

Browse files
committed
Update types
1 parent 259eab7 commit 8359f94

File tree

2 files changed

+66
-41
lines changed

2 files changed

+66
-41
lines changed

datdot-node/pallets/datdot/types.json

+65-40
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,81 @@
11
{
2-
"Node": {
3-
"index": "u64",
4-
"hash": "H256",
5-
"size": "u64"
2+
"RoleValue": "Option<u32>",
3+
"Public": "[u8; 32]",
4+
"ChunkIndex": "u64",
5+
"FeedId": "u32",
6+
"UserId": "u32",
7+
"ContractId": "u32",
8+
"ChallengeId": "u32",
9+
"PlanId": "u32",
10+
"AttestationId": "u32",
11+
"NoiseKey": "Vec<u8>",
12+
"FeedKey": "Public",
13+
"Ranges": "Vec<(C, C)>",
14+
"Nonce": "u64",
15+
"Role": "{
16+
Encoder,
17+
Hoster,
18+
Attestor
19+
}",
20+
"User": {
21+
"id": "UserId",
22+
"address": "AccountId",
23+
"noise_key": "Option<NoiseKey>"
624
},
7-
"Proof": {
8-
"index": "u64",
9-
"nodes": "Vec<Node>",
10-
"signature": "Option<Signature>"
11-
},
12-
"ChunkHashPayload": {
13-
"hash_type": "u8",
14-
"chunk_length": "u64",
15-
"chunk_content": "Vec<u8>"
16-
},
17-
"ParentHashPayload": {
18-
"hash_type": "u8",
19-
"total_length": "u64",
20-
"child_hashes": "[H256; 2]"
25+
"Feed": {
26+
"id": "FeedId",
27+
"publickey": "FeedKey",
28+
"meta": "TreeRoot"
2129
},
2230
"ParentHashInRoot": {
2331
"hash": "H256",
2432
"hash_number": "u64",
2533
"total_length": "u64"
2634
},
27-
"TreeHashPayload": {
35+
"TreeRoot": {
36+
"signature": "H512",
2837
"hash_type": "u8",
2938
"children": "Vec<ParentHashInRoot>"
3039
},
31-
"Attestation": {
32-
"location": "u8",
33-
"latency": "Option<u8>"
40+
"TreeHashPayload": {
41+
"hash_type": "u8",
42+
"children": "Vec<ParentHashInRoot>"
3443
},
35-
"ChallengeAttestations": {
36-
"expected_attestors": "Vec<u64>",
37-
"expected_friends": "Vec<u64>",
38-
"completed": "Vec<(u64, Attestation)>"
44+
"Plan": {
45+
"id": "PlanId",
46+
"feed": "FeedId",
47+
"publisher": "UserId",
48+
"ranges": "Ranges<ChunkIndex> "
3949
},
40-
"HostedArchive": {
41-
"encoded": "Vec<(u64,(u64, u64))>",
42-
"encoding": "Vec<(u64,(u64, u64))>",
43-
"state": "BTreeMap<u64, Challenge>"
50+
"Contract": {
51+
"id": "ContractId",
52+
"plan": "PlanId",
53+
"ranges": "Ranges<ChunkIndex>",
54+
"encoder": "UserId",
55+
"hoster": "UserId"
4456
},
4557
"Challenge": {
46-
"_enum":{
47-
"Active":"u64",
48-
"Attesting":"ChallengeAttestation"
49-
}
50-
},
51-
"DatIdIndex": "u64",
52-
"DatIdVec": "Vec<DatIdIndex>",
53-
"UserIdIndex": "u64",
54-
"DatSize": "u64",
55-
"Public": "[u8; 32]"
58+
"id": "ChallengeId",
59+
"contract": "ContractId",
60+
"chunks": "Vec<ChunkIndex>"
61+
},
62+
"Node": {
63+
"index": "u64",
64+
"hash": "H256",
65+
"size": "u64"
66+
},
67+
"Proof": {
68+
"index": "u64",
69+
"nodes": "Vec<Node>",
70+
"signature": "Option<Signature>"
71+
},
72+
"Attestation": {
73+
"id": "AttestationId",
74+
"attestor": "UserId",
75+
"contract": "ContractId"
76+
},
77+
"Report": {
78+
"location": "u8",
79+
"latency": "Option<u8>"
80+
}
5681
}

types.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
"UserIdIndex": "u64",
5656
"DatSize": "u64",
5757
"Public": "[u8; 32]"
58-
}
58+
}

0 commit comments

Comments
 (0)