@witnet/sdk 1.2.3 → 1.2.5
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/dist/package.json +4 -6
- package/package.json +4 -6
- package/witnet/assets/_index.cjs +0 -5
- package/witnet/assets/_requests.cjs +0 -25
- package/witnet/assets/_sources.cjs +0 -36
- package/witnet/assets/_templates.cjs +0 -36
- package/witnet/assets/index.cjs +0 -4
- package/witnet/assets/modals/index.cjs +0 -7
- package/witnet/assets/modals/web3/btc.cjs +0 -0
- package/witnet/assets/modals/web3/eth.cjs +0 -27
- package/witnet/assets/modals/web3/ipfs.cjs +0 -22
- package/witnet/assets/modals/web3/sol.cjs +0 -0
- package/witnet/assets/modals/web3/wit.cjs +0 -28
- package/witnet/assets/requests.cjs +0 -49
- package/witnet/witnet copy.proto +0 -457
- package/witnet/witnet.proto +0 -456
- package/witnet/witnet.proto.json +0 -1322
- package/witnet/witnet_toolkit-1.6.7-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-1.7.1-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-2.0.0-rc.7-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-2.0.2-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-2.0.21-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-2.0.7-x86_64-pc-windows-msvc.exe +0 -0
- package/witnet/witnet_toolkit-2.0.8-x86_64-pc-windows-msvc.exe +0 -0
package/witnet/witnet copy.proto
DELETED
|
@@ -1,457 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package witnet;
|
|
4
|
-
|
|
5
|
-
message LegacyMessage {
|
|
6
|
-
message LegacyCommand {
|
|
7
|
-
oneof kind {
|
|
8
|
-
Version Version = 1;
|
|
9
|
-
Verack Verack = 2;
|
|
10
|
-
GetPeers GetPeers = 3;
|
|
11
|
-
Peers Peers = 4;
|
|
12
|
-
LegacyBlock Block = 5;
|
|
13
|
-
InventoryAnnouncement InventoryAnnouncement = 6;
|
|
14
|
-
InventoryRequest InventoryRequest = 7;
|
|
15
|
-
LastBeacon LastBeacon = 8;
|
|
16
|
-
Transaction Transaction = 9;
|
|
17
|
-
SuperBlockVote SuperBlockVote = 10;
|
|
18
|
-
SuperBlock SuperBlock = 11;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// uint32 is not a fixed-size 32 bit integer: it uses variable length encoding
|
|
23
|
-
uint32 magic = 1;
|
|
24
|
-
LegacyCommand kind = 2;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
message Message {
|
|
28
|
-
message Command {
|
|
29
|
-
oneof kind {
|
|
30
|
-
Version Version = 1;
|
|
31
|
-
Verack Verack = 2;
|
|
32
|
-
GetPeers GetPeers = 3;
|
|
33
|
-
Peers Peers = 4;
|
|
34
|
-
Block Block = 5;
|
|
35
|
-
InventoryAnnouncement InventoryAnnouncement = 6;
|
|
36
|
-
InventoryRequest InventoryRequest = 7;
|
|
37
|
-
LastBeacon LastBeacon = 8;
|
|
38
|
-
Transaction Transaction = 9;
|
|
39
|
-
SuperBlockVote SuperBlockVote = 10;
|
|
40
|
-
SuperBlock SuperBlock = 11;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// uint32 is not a fixed-size 32 bit integer: it uses variable length encoding
|
|
45
|
-
uint32 magic = 1;
|
|
46
|
-
Command kind = 2;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
message Version {
|
|
50
|
-
uint32 version = 1;
|
|
51
|
-
int64 timestamp = 2;
|
|
52
|
-
fixed64 capabilities = 3;
|
|
53
|
-
Address sender_address = 4;
|
|
54
|
-
Address receiver_address = 5;
|
|
55
|
-
string user_agent = 6;
|
|
56
|
-
fixed64 nonce = 7;
|
|
57
|
-
LastBeacon beacon = 8;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
message Verack {
|
|
61
|
-
// Intentionally empty
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
message GetPeers {
|
|
65
|
-
// Intentionally empty
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
message Peers {
|
|
69
|
-
repeated Address peers = 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message BlockEligibilityClaim {
|
|
73
|
-
VrfProof proof = 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message LegacyBlock {
|
|
77
|
-
message LegacyBlockHeader {
|
|
78
|
-
message LegacyBlockMerkleRoots {
|
|
79
|
-
Hash mint_hash = 1;
|
|
80
|
-
Hash vt_hash_merkle_root = 2;
|
|
81
|
-
Hash dr_hash_merkle_root = 3;
|
|
82
|
-
Hash commit_hash_merkle_root = 4;
|
|
83
|
-
Hash reveal_hash_merkle_root = 5;
|
|
84
|
-
Hash tally_hash_merkle_root = 6;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
uint32 signals = 1;
|
|
88
|
-
CheckpointBeacon beacon = 2;
|
|
89
|
-
LegacyBlockMerkleRoots merkle_roots = 3;
|
|
90
|
-
BlockEligibilityClaim proof = 4;
|
|
91
|
-
Bn256PublicKey bn256_public_key = 5;
|
|
92
|
-
}
|
|
93
|
-
message LegacyBlockTransactions {
|
|
94
|
-
MintTransaction mint = 1;
|
|
95
|
-
repeated VTTransaction value_transfer_txns = 2;
|
|
96
|
-
repeated DRTransaction data_request_txns = 3;
|
|
97
|
-
repeated CommitTransaction commit_txns = 4;
|
|
98
|
-
repeated RevealTransaction reveal_txns = 5;
|
|
99
|
-
repeated TallyTransaction tally_txns = 6;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
LegacyBlockHeader block_header = 1;
|
|
103
|
-
KeyedSignature block_sig = 2;
|
|
104
|
-
LegacyBlockTransactions txns = 3;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
message Block {
|
|
108
|
-
message BlockHeader {
|
|
109
|
-
message BlockMerkleRoots {
|
|
110
|
-
Hash mint_hash = 1;
|
|
111
|
-
Hash vt_hash_merkle_root = 2;
|
|
112
|
-
Hash dr_hash_merkle_root = 3;
|
|
113
|
-
Hash commit_hash_merkle_root = 4;
|
|
114
|
-
Hash reveal_hash_merkle_root = 5;
|
|
115
|
-
Hash tally_hash_merkle_root = 6;
|
|
116
|
-
Hash stake_hash_merkle_root = 7;
|
|
117
|
-
Hash unstake_hash_merkle_root = 8;
|
|
118
|
-
}
|
|
119
|
-
uint32 signals = 1;
|
|
120
|
-
CheckpointBeacon beacon = 2;
|
|
121
|
-
BlockMerkleRoots merkle_roots = 3;
|
|
122
|
-
BlockEligibilityClaim proof = 4;
|
|
123
|
-
Bn256PublicKey bn256_public_key = 5;
|
|
124
|
-
}
|
|
125
|
-
message BlockTransactions {
|
|
126
|
-
MintTransaction mint = 1;
|
|
127
|
-
repeated VTTransaction value_transfer_txns = 2;
|
|
128
|
-
repeated DRTransaction data_request_txns = 3;
|
|
129
|
-
repeated CommitTransaction commit_txns = 4;
|
|
130
|
-
repeated RevealTransaction reveal_txns = 5;
|
|
131
|
-
repeated TallyTransaction tally_txns = 6;
|
|
132
|
-
repeated StakeTransaction stake_txns = 7;
|
|
133
|
-
repeated UnstakeTransaction unstake_txns = 8;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
BlockHeader block_header = 1;
|
|
137
|
-
KeyedSignature block_sig = 2;
|
|
138
|
-
BlockTransactions txns = 3;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
message SuperBlock {
|
|
142
|
-
uint32 signing_committee_length = 1;
|
|
143
|
-
Hash ars_root = 2;
|
|
144
|
-
Hash data_request_root = 3;
|
|
145
|
-
uint32 index = 4;
|
|
146
|
-
Hash last_block = 5;
|
|
147
|
-
Hash last_block_in_previous_superblock = 6;
|
|
148
|
-
Hash tally_root = 7;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
message InventoryAnnouncement {
|
|
152
|
-
repeated InventoryEntry inventory = 1;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
message InventoryRequest {
|
|
156
|
-
repeated InventoryEntry inventory = 1;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
message LastBeacon {
|
|
160
|
-
CheckpointBeacon highest_block_checkpoint = 1;
|
|
161
|
-
CheckpointBeacon highest_superblock_checkpoint = 2;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
message OutputPointer {
|
|
165
|
-
Hash transaction_id = 1;
|
|
166
|
-
uint32 output_index = 2;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
message ValueTransferOutput {
|
|
170
|
-
PublicKeyHash pkh = 1;
|
|
171
|
-
uint64 value = 2;
|
|
172
|
-
uint64 time_lock = 3;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
message DataRequestOutput {
|
|
176
|
-
message RADRequest {
|
|
177
|
-
enum RADType {
|
|
178
|
-
Echo = 5;
|
|
179
|
-
HttpGet = 1;
|
|
180
|
-
HttpHead = 4;
|
|
181
|
-
HttpPost = 3;
|
|
182
|
-
Rng = 2;
|
|
183
|
-
Unknown = 0;
|
|
184
|
-
}
|
|
185
|
-
message RADFilter {
|
|
186
|
-
uint32 op = 1;
|
|
187
|
-
bytes args = 2;
|
|
188
|
-
}
|
|
189
|
-
message RADRetrieve {
|
|
190
|
-
RADType kind = 1;
|
|
191
|
-
string url = 2;
|
|
192
|
-
// TODO: RADScript should maybe be a type?
|
|
193
|
-
bytes script = 3;
|
|
194
|
-
// Optional body for HTTP-POST retrievals, mandatory on ECHO retrievals
|
|
195
|
-
bytes body = 4;
|
|
196
|
-
// Extra headers for HTTP-GET, HTTP-HEAD, HTTP-POST and ECHO retrievals
|
|
197
|
-
repeated StringPair headers = 5;
|
|
198
|
-
}
|
|
199
|
-
message RADAggregate {
|
|
200
|
-
repeated RADFilter filters = 1;
|
|
201
|
-
uint32 reducer = 2;
|
|
202
|
-
boolean encrypt = 3;
|
|
203
|
-
}
|
|
204
|
-
message RADTally {
|
|
205
|
-
repeated RADFilter filters = 1;
|
|
206
|
-
uint32 reducer = 2;
|
|
207
|
-
}
|
|
208
|
-
uint64 time_lock = 1;
|
|
209
|
-
repeated RADRetrieve retrieve = 2;
|
|
210
|
-
RADAggregate aggregate = 3;
|
|
211
|
-
RADTally tally = 4;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
RADRequest data_request = 1;
|
|
215
|
-
uint64 witness_reward = 2;
|
|
216
|
-
uint32 witnesses = 3;
|
|
217
|
-
uint64 commit_and_reveal_fee = 4;
|
|
218
|
-
uint32 min_consensus_percentage = 5;
|
|
219
|
-
uint64 collateral = 6;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
message StringPair {
|
|
223
|
-
string left = 1;
|
|
224
|
-
string right = 2;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
message Input {
|
|
228
|
-
OutputPointer output_pointer = 1;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// Transaction types
|
|
232
|
-
message VTTransactionBody {
|
|
233
|
-
repeated Input inputs = 1;
|
|
234
|
-
repeated ValueTransferOutput outputs = 2;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
message VTTransaction {
|
|
238
|
-
VTTransactionBody body = 1;
|
|
239
|
-
repeated KeyedSignature signatures = 2;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
message DRTransactionBody {
|
|
243
|
-
repeated Input inputs = 1;
|
|
244
|
-
repeated ValueTransferOutput outputs = 2;
|
|
245
|
-
DataRequestOutput dr_output = 3;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
message DRTransaction {
|
|
249
|
-
DRTransactionBody body = 1;
|
|
250
|
-
repeated KeyedSignature signatures = 2;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
message CommitTransactionBody {
|
|
254
|
-
Hash dr_pointer = 1;
|
|
255
|
-
Hash commitment = 2;
|
|
256
|
-
DataRequestEligibilityClaim proof = 3;
|
|
257
|
-
repeated Input collateral = 4;
|
|
258
|
-
repeated ValueTransferOutput outputs = 5;
|
|
259
|
-
Bn256PublicKey bn256_public_key = 6;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
message CommitTransaction {
|
|
263
|
-
CommitTransactionBody body = 1;
|
|
264
|
-
repeated KeyedSignature signatures = 2;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
message RevealTransactionBody {
|
|
268
|
-
Hash dr_pointer = 1;
|
|
269
|
-
bytes reveal = 2;
|
|
270
|
-
PublicKeyHash pkh = 3;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
message RevealTransaction {
|
|
274
|
-
RevealTransactionBody body = 1;
|
|
275
|
-
repeated KeyedSignature signatures = 2;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
message TallyTransaction {
|
|
279
|
-
Hash dr_pointer = 1;
|
|
280
|
-
bytes tally = 2;
|
|
281
|
-
repeated ValueTransferOutput outputs = 3;
|
|
282
|
-
repeated PublicKeyHash out_of_consensus = 4;
|
|
283
|
-
repeated PublicKeyHash error_committers = 5;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
message MintTransaction {
|
|
287
|
-
// The epoch field is used to ensure that each MintTransaction has a unique hash
|
|
288
|
-
fixed32 epoch = 1;
|
|
289
|
-
repeated ValueTransferOutput outputs = 2;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
message StakeKey {
|
|
293
|
-
PublicKeyHash validator = 1;
|
|
294
|
-
PublicKeyHash withdrawer = 2;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
message StakeOutput {
|
|
298
|
-
uint64 value = 1;
|
|
299
|
-
StakeKey key = 2;
|
|
300
|
-
KeyedSignature authorization = 3;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
message StakeTransactionBody {
|
|
304
|
-
repeated Input inputs = 1;
|
|
305
|
-
StakeOutput output = 2;
|
|
306
|
-
ValueTransferOutput change = 3;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
message StakeTransaction {
|
|
310
|
-
StakeTransactionBody body = 1 ;
|
|
311
|
-
repeated KeyedSignature signatures = 2;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
message UnstakeTransactionBody {
|
|
315
|
-
PublicKeyHash operator = 1;
|
|
316
|
-
ValueTransferOutput withdrawal = 2;
|
|
317
|
-
uint64 fee = 3;
|
|
318
|
-
uint64 nonce = 4;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
message UnstakeTransaction {
|
|
322
|
-
UnstakeTransactionBody body = 1 ;
|
|
323
|
-
KeyedSignature signature = 2;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
message Transaction {
|
|
327
|
-
oneof kind {
|
|
328
|
-
VTTransaction ValueTransfer = 1;
|
|
329
|
-
DRTransaction DataRequest = 2;
|
|
330
|
-
CommitTransaction Commit = 3;
|
|
331
|
-
RevealTransaction Reveal = 4;
|
|
332
|
-
TallyTransaction Tally = 5;
|
|
333
|
-
MintTransaction Mint = 6;
|
|
334
|
-
StakeTransaction Stake = 7;
|
|
335
|
-
UnstakeTransaction Unstake = 8;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Helper structures (not meant to be sent directly as messages)
|
|
340
|
-
message Hash {
|
|
341
|
-
oneof kind {
|
|
342
|
-
bytes SHA256 = 1;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
message Secp256k1Signature {
|
|
347
|
-
bytes der = 1;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
message Signature {
|
|
351
|
-
oneof kind {
|
|
352
|
-
Secp256k1Signature Secp256k1 = 1;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
message Bn256Signature {
|
|
357
|
-
bytes signature = 1;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
message PublicKey {
|
|
361
|
-
bytes public_key = 1;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
message Bn256PublicKey {
|
|
365
|
-
bytes public_key = 1;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
message PublicKeyHash {
|
|
369
|
-
bytes hash = 1;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
message KeyedSignature {
|
|
373
|
-
Signature signature = 1;
|
|
374
|
-
PublicKey public_key = 2;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
message Bn256KeyedSignature {
|
|
378
|
-
Bn256Signature signature = 1;
|
|
379
|
-
Bn256PublicKey public_key = 2;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
message Address {
|
|
383
|
-
bytes address = 1;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
message CheckpointBeacon {
|
|
387
|
-
fixed32 checkpoint = 1;
|
|
388
|
-
Hash hash_prev_block = 2;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
message CheckpointVRF {
|
|
392
|
-
fixed32 checkpoint = 1;
|
|
393
|
-
Hash hash_prev_vrf = 2;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
message InventoryEntry {
|
|
397
|
-
oneof kind {
|
|
398
|
-
Hash Block = 1;
|
|
399
|
-
Hash Tx = 2;
|
|
400
|
-
uint32 SuperBlock = 3;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
message ConsensusConstants {
|
|
405
|
-
int64 checkpoint_zero_timestamp = 1;
|
|
406
|
-
uint32 checkpoints_period = 2;
|
|
407
|
-
Hash bootstrap_hash = 3;
|
|
408
|
-
Hash genesis_hash = 4;
|
|
409
|
-
uint32 max_vt_weight = 5;
|
|
410
|
-
uint32 max_dr_weight = 6;
|
|
411
|
-
uint32 activity_period = 7;
|
|
412
|
-
uint32 reputation_expire_alpha_diff = 8;
|
|
413
|
-
uint32 reputation_issuance = 9;
|
|
414
|
-
uint32 reputation_issuance_stop = 10;
|
|
415
|
-
double reputation_penalization_factor = 11;
|
|
416
|
-
uint32 mining_backup_factor = 12;
|
|
417
|
-
uint32 mining_replication_factor = 13;
|
|
418
|
-
uint64 collateral_minimum = 14;
|
|
419
|
-
uint32 collateral_age = 15;
|
|
420
|
-
uint32 superblock_period = 16;
|
|
421
|
-
uint32 extra_rounds = 17;
|
|
422
|
-
uint32 minimum_difficulty = 18;
|
|
423
|
-
uint32 epochs_with_minimum_difficulty = 19;
|
|
424
|
-
repeated string bootstrapping_committee = 20;
|
|
425
|
-
uint32 superblock_signing_committee_size = 21;
|
|
426
|
-
uint32 superblock_committee_decreasing_period = 22;
|
|
427
|
-
uint32 superblock_committee_decreasing_step = 23;
|
|
428
|
-
uint64 initial_block_reward = 24;
|
|
429
|
-
uint32 halving_period = 25;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
message ConsensusConstantsWit2 {
|
|
433
|
-
int64 checkpoint_zero_timestamp = 1;
|
|
434
|
-
uint32 checkpoints_period = 2;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
message VrfProof {
|
|
438
|
-
bytes proof = 1;
|
|
439
|
-
PublicKey public_key = 2;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
message DataRequestVrfMessage {
|
|
443
|
-
CheckpointVRF vrf_input = 1;
|
|
444
|
-
Hash dr_hash = 2;
|
|
445
|
-
PublicKeyHash withdrawer = 3;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
message DataRequestEligibilityClaim {
|
|
449
|
-
VrfProof proof = 1;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
message SuperBlockVote {
|
|
453
|
-
Bn256Signature bn256_signature = 1;
|
|
454
|
-
KeyedSignature secp256k1_signature = 2;
|
|
455
|
-
Hash superblock_hash = 3;
|
|
456
|
-
fixed32 superblock_index = 4;
|
|
457
|
-
}
|