@vocdoni/proto 1.14.3 → 1.15.0
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/.github/workflows/post-merge.yml +0 -1
- package/.idea/dvote-protobuf.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/Makefile +0 -1
- package/dist/client-store/index.d.ts +2 -2
- package/dist/client-store/index.js +182 -132
- package/dist/client-store/index.mjs +182 -132
- package/dist/{entity-35513b52.d.ts → entity-e8dfcd83.d.ts} +1 -1
- package/dist/{index-7dfc19fc.d.ts → index-05df597a.d.ts} +1 -1
- package/dist/{index-8a98085c.d.ts → index-4d38492a.d.ts} +1294 -716
- package/dist/{index-45e93762.d.ts → index-d457aeb5.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1762 -1156
- package/dist/index.mjs +1762 -1156
- package/dist/metadata/index.d.ts +2 -2
- package/dist/metadata/index.js +463 -325
- package/dist/metadata/index.mjs +463 -325
- package/dist/vochain/index.d.ts +1 -1
- package/dist/vochain/index.js +1126 -706
- package/dist/vochain/index.mjs +1124 -706
- package/package.json +39 -39
- package/src/vochain/vochain.proto +20 -9
- package/vocdoni-proto-v1.15.0.tgz +0 -0
package/dist/vochain/index.js
CHANGED
|
@@ -1455,12 +1455,14 @@ __export(vochain_exports, {
|
|
|
1455
1455
|
ProofZkSNARK: () => ProofZkSNARK,
|
|
1456
1456
|
QuestionResult: () => QuestionResult,
|
|
1457
1457
|
RegisterKeyTx: () => RegisterKeyTx,
|
|
1458
|
+
RegisterSIKTx: () => RegisterSIKTx,
|
|
1458
1459
|
SendTokensTx: () => SendTokensTx,
|
|
1459
1460
|
SetAccountTx: () => SetAccountTx,
|
|
1460
1461
|
SetKeykeeperTx: () => SetKeykeeperTx,
|
|
1461
1462
|
SetProcessTx: () => SetProcessTx,
|
|
1462
1463
|
SetTransactionCostsTx: () => SetTransactionCostsTx,
|
|
1463
1464
|
SignedTx: () => SignedTx,
|
|
1465
|
+
SikTx: () => SikTx,
|
|
1464
1466
|
SourceNetworkId: () => SourceNetworkId,
|
|
1465
1467
|
StoredKeys: () => StoredKeys,
|
|
1466
1468
|
TendermintHeader: () => TendermintHeader,
|
|
@@ -1517,6 +1519,8 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
|
|
|
1517
1519
|
TxType2[TxType2["ADD_KEYKEEPER"] = 21] = "ADD_KEYKEEPER";
|
|
1518
1520
|
TxType2[TxType2["DELETE_KEYKEEPER"] = 22] = "DELETE_KEYKEEPER";
|
|
1519
1521
|
TxType2[TxType2["CREATE_ACCOUNT"] = 23] = "CREATE_ACCOUNT";
|
|
1522
|
+
TxType2[TxType2["SET_ACCOUNT_SIK"] = 24] = "SET_ACCOUNT_SIK";
|
|
1523
|
+
TxType2[TxType2["DEL_ACCOUNT_SIK"] = 25] = "DEL_ACCOUNT_SIK";
|
|
1520
1524
|
TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1521
1525
|
return TxType2;
|
|
1522
1526
|
})(TxType || {});
|
|
@@ -1594,6 +1598,12 @@ function txTypeFromJSON(object) {
|
|
|
1594
1598
|
case 23:
|
|
1595
1599
|
case "CREATE_ACCOUNT":
|
|
1596
1600
|
return 23 /* CREATE_ACCOUNT */;
|
|
1601
|
+
case 24:
|
|
1602
|
+
case "SET_ACCOUNT_SIK":
|
|
1603
|
+
return 24 /* SET_ACCOUNT_SIK */;
|
|
1604
|
+
case 25:
|
|
1605
|
+
case "DEL_ACCOUNT_SIK":
|
|
1606
|
+
return 25 /* DEL_ACCOUNT_SIK */;
|
|
1597
1607
|
case -1:
|
|
1598
1608
|
case "UNRECOGNIZED":
|
|
1599
1609
|
default:
|
|
@@ -1650,6 +1660,10 @@ function txTypeToJSON(object) {
|
|
|
1650
1660
|
return "DELETE_KEYKEEPER";
|
|
1651
1661
|
case 23 /* CREATE_ACCOUNT */:
|
|
1652
1662
|
return "CREATE_ACCOUNT";
|
|
1663
|
+
case 24 /* SET_ACCOUNT_SIK */:
|
|
1664
|
+
return "SET_ACCOUNT_SIK";
|
|
1665
|
+
case 25 /* DEL_ACCOUNT_SIK */:
|
|
1666
|
+
return "DEL_ACCOUNT_SIK";
|
|
1653
1667
|
case -1 /* UNRECOGNIZED */:
|
|
1654
1668
|
default:
|
|
1655
1669
|
return "UNRECOGNIZED";
|
|
@@ -2072,11 +2086,11 @@ function proofArbo_KeyTypeToJSON(object) {
|
|
|
2072
2086
|
}
|
|
2073
2087
|
function createBaseVoteEnvelope() {
|
|
2074
2088
|
return {
|
|
2075
|
-
nonce: new Uint8Array(),
|
|
2076
|
-
processId: new Uint8Array(),
|
|
2089
|
+
nonce: new Uint8Array(0),
|
|
2090
|
+
processId: new Uint8Array(0),
|
|
2077
2091
|
proof: void 0,
|
|
2078
|
-
votePackage: new Uint8Array(),
|
|
2079
|
-
nullifier: new Uint8Array(),
|
|
2092
|
+
votePackage: new Uint8Array(0),
|
|
2093
|
+
nullifier: new Uint8Array(0),
|
|
2080
2094
|
encryptionKeyIndexes: []
|
|
2081
2095
|
};
|
|
2082
2096
|
}
|
|
@@ -2112,41 +2126,41 @@ var VoteEnvelope = {
|
|
|
2112
2126
|
const tag = reader.uint32();
|
|
2113
2127
|
switch (tag >>> 3) {
|
|
2114
2128
|
case 1:
|
|
2115
|
-
if (tag
|
|
2129
|
+
if (tag !== 10) {
|
|
2116
2130
|
break;
|
|
2117
2131
|
}
|
|
2118
2132
|
message.nonce = reader.bytes();
|
|
2119
2133
|
continue;
|
|
2120
2134
|
case 2:
|
|
2121
|
-
if (tag
|
|
2135
|
+
if (tag !== 18) {
|
|
2122
2136
|
break;
|
|
2123
2137
|
}
|
|
2124
2138
|
message.processId = reader.bytes();
|
|
2125
2139
|
continue;
|
|
2126
2140
|
case 3:
|
|
2127
|
-
if (tag
|
|
2141
|
+
if (tag !== 26) {
|
|
2128
2142
|
break;
|
|
2129
2143
|
}
|
|
2130
2144
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
2131
2145
|
continue;
|
|
2132
2146
|
case 4:
|
|
2133
|
-
if (tag
|
|
2147
|
+
if (tag !== 34) {
|
|
2134
2148
|
break;
|
|
2135
2149
|
}
|
|
2136
2150
|
message.votePackage = reader.bytes();
|
|
2137
2151
|
continue;
|
|
2138
2152
|
case 5:
|
|
2139
|
-
if (tag
|
|
2153
|
+
if (tag !== 42) {
|
|
2140
2154
|
break;
|
|
2141
2155
|
}
|
|
2142
2156
|
message.nullifier = reader.bytes();
|
|
2143
2157
|
continue;
|
|
2144
2158
|
case 6:
|
|
2145
|
-
if (tag
|
|
2159
|
+
if (tag === 48) {
|
|
2146
2160
|
message.encryptionKeyIndexes.push(reader.uint32());
|
|
2147
2161
|
continue;
|
|
2148
2162
|
}
|
|
2149
|
-
if (tag
|
|
2163
|
+
if (tag === 50) {
|
|
2150
2164
|
const end2 = reader.uint32() + reader.pos;
|
|
2151
2165
|
while (reader.pos < end2) {
|
|
2152
2166
|
message.encryptionKeyIndexes.push(reader.uint32());
|
|
@@ -2155,7 +2169,7 @@ var VoteEnvelope = {
|
|
|
2155
2169
|
}
|
|
2156
2170
|
break;
|
|
2157
2171
|
}
|
|
2158
|
-
if ((tag & 7)
|
|
2172
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2159
2173
|
break;
|
|
2160
2174
|
}
|
|
2161
2175
|
reader.skipType(tag & 7);
|
|
@@ -2164,25 +2178,33 @@ var VoteEnvelope = {
|
|
|
2164
2178
|
},
|
|
2165
2179
|
fromJSON(object) {
|
|
2166
2180
|
return {
|
|
2167
|
-
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(),
|
|
2168
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
2181
|
+
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(0),
|
|
2182
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
2169
2183
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
2170
|
-
votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(),
|
|
2171
|
-
nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(),
|
|
2184
|
+
votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(0),
|
|
2185
|
+
nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(0),
|
|
2172
2186
|
encryptionKeyIndexes: Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => Number(e)) : []
|
|
2173
2187
|
};
|
|
2174
2188
|
},
|
|
2175
2189
|
toJSON(message) {
|
|
2176
2190
|
const obj = {};
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2191
|
+
if (message.nonce.length !== 0) {
|
|
2192
|
+
obj.nonce = base64FromBytes(message.nonce);
|
|
2193
|
+
}
|
|
2194
|
+
if (message.processId.length !== 0) {
|
|
2195
|
+
obj.processId = base64FromBytes(message.processId);
|
|
2196
|
+
}
|
|
2197
|
+
if (message.proof !== void 0) {
|
|
2198
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
2199
|
+
}
|
|
2200
|
+
if (message.votePackage.length !== 0) {
|
|
2201
|
+
obj.votePackage = base64FromBytes(message.votePackage);
|
|
2202
|
+
}
|
|
2203
|
+
if (message.nullifier.length !== 0) {
|
|
2204
|
+
obj.nullifier = base64FromBytes(message.nullifier);
|
|
2205
|
+
}
|
|
2206
|
+
if (message.encryptionKeyIndexes?.length) {
|
|
2183
2207
|
obj.encryptionKeyIndexes = message.encryptionKeyIndexes.map((e) => Math.round(e));
|
|
2184
|
-
} else {
|
|
2185
|
-
obj.encryptionKeyIndexes = [];
|
|
2186
2208
|
}
|
|
2187
2209
|
return obj;
|
|
2188
2210
|
},
|
|
@@ -2191,11 +2213,11 @@ var VoteEnvelope = {
|
|
|
2191
2213
|
},
|
|
2192
2214
|
fromPartial(object) {
|
|
2193
2215
|
const message = createBaseVoteEnvelope();
|
|
2194
|
-
message.nonce = object.nonce ?? new Uint8Array();
|
|
2195
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
2216
|
+
message.nonce = object.nonce ?? new Uint8Array(0);
|
|
2217
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
2196
2218
|
message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
|
|
2197
|
-
message.votePackage = object.votePackage ?? new Uint8Array();
|
|
2198
|
-
message.nullifier = object.nullifier ?? new Uint8Array();
|
|
2219
|
+
message.votePackage = object.votePackage ?? new Uint8Array(0);
|
|
2220
|
+
message.nullifier = object.nullifier ?? new Uint8Array(0);
|
|
2199
2221
|
message.encryptionKeyIndexes = object.encryptionKeyIndexes?.map((e) => e) || [];
|
|
2200
2222
|
return message;
|
|
2201
2223
|
}
|
|
@@ -2215,7 +2237,7 @@ var Census = {
|
|
|
2215
2237
|
const tag = reader.uint32();
|
|
2216
2238
|
switch (tag >>> 3) {
|
|
2217
2239
|
}
|
|
2218
|
-
if ((tag & 7)
|
|
2240
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2219
2241
|
break;
|
|
2220
2242
|
}
|
|
2221
2243
|
reader.skipType(tag & 7);
|
|
@@ -2278,19 +2300,19 @@ var Proof = {
|
|
|
2278
2300
|
const tag = reader.uint32();
|
|
2279
2301
|
switch (tag >>> 3) {
|
|
2280
2302
|
case 1:
|
|
2281
|
-
if (tag
|
|
2303
|
+
if (tag !== 10) {
|
|
2282
2304
|
break;
|
|
2283
2305
|
}
|
|
2284
2306
|
message.payload = { $case: "graviton", graviton: ProofGraviton.decode(reader, reader.uint32()) };
|
|
2285
2307
|
continue;
|
|
2286
2308
|
case 2:
|
|
2287
|
-
if (tag
|
|
2309
|
+
if (tag !== 18) {
|
|
2288
2310
|
break;
|
|
2289
2311
|
}
|
|
2290
2312
|
message.payload = { $case: "iden3", iden3: ProofIden3.decode(reader, reader.uint32()) };
|
|
2291
2313
|
continue;
|
|
2292
2314
|
case 3:
|
|
2293
|
-
if (tag
|
|
2315
|
+
if (tag !== 26) {
|
|
2294
2316
|
break;
|
|
2295
2317
|
}
|
|
2296
2318
|
message.payload = {
|
|
@@ -2299,7 +2321,7 @@ var Proof = {
|
|
|
2299
2321
|
};
|
|
2300
2322
|
continue;
|
|
2301
2323
|
case 4:
|
|
2302
|
-
if (tag
|
|
2324
|
+
if (tag !== 34) {
|
|
2303
2325
|
break;
|
|
2304
2326
|
}
|
|
2305
2327
|
message.payload = {
|
|
@@ -2308,31 +2330,31 @@ var Proof = {
|
|
|
2308
2330
|
};
|
|
2309
2331
|
continue;
|
|
2310
2332
|
case 5:
|
|
2311
|
-
if (tag
|
|
2333
|
+
if (tag !== 42) {
|
|
2312
2334
|
break;
|
|
2313
2335
|
}
|
|
2314
2336
|
message.payload = { $case: "ca", ca: ProofCA.decode(reader, reader.uint32()) };
|
|
2315
2337
|
continue;
|
|
2316
2338
|
case 6:
|
|
2317
|
-
if (tag
|
|
2339
|
+
if (tag !== 50) {
|
|
2318
2340
|
break;
|
|
2319
2341
|
}
|
|
2320
2342
|
message.payload = { $case: "arbo", arbo: ProofArbo.decode(reader, reader.uint32()) };
|
|
2321
2343
|
continue;
|
|
2322
2344
|
case 7:
|
|
2323
|
-
if (tag
|
|
2345
|
+
if (tag !== 58) {
|
|
2324
2346
|
break;
|
|
2325
2347
|
}
|
|
2326
2348
|
message.payload = { $case: "zkSnark", zkSnark: ProofZkSNARK.decode(reader, reader.uint32()) };
|
|
2327
2349
|
continue;
|
|
2328
2350
|
case 8:
|
|
2329
|
-
if (tag
|
|
2351
|
+
if (tag !== 66) {
|
|
2330
2352
|
break;
|
|
2331
2353
|
}
|
|
2332
2354
|
message.payload = { $case: "minimeStorage", minimeStorage: ProofMinime.decode(reader, reader.uint32()) };
|
|
2333
2355
|
continue;
|
|
2334
2356
|
}
|
|
2335
|
-
if ((tag & 7)
|
|
2357
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2336
2358
|
break;
|
|
2337
2359
|
}
|
|
2338
2360
|
reader.skipType(tag & 7);
|
|
@@ -2346,14 +2368,30 @@ var Proof = {
|
|
|
2346
2368
|
},
|
|
2347
2369
|
toJSON(message) {
|
|
2348
2370
|
const obj = {};
|
|
2349
|
-
message.payload?.$case === "graviton"
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
message.payload?.$case === "
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
message.payload?.$case === "
|
|
2356
|
-
|
|
2371
|
+
if (message.payload?.$case === "graviton") {
|
|
2372
|
+
obj.graviton = ProofGraviton.toJSON(message.payload.graviton);
|
|
2373
|
+
}
|
|
2374
|
+
if (message.payload?.$case === "iden3") {
|
|
2375
|
+
obj.iden3 = ProofIden3.toJSON(message.payload.iden3);
|
|
2376
|
+
}
|
|
2377
|
+
if (message.payload?.$case === "ethereumStorage") {
|
|
2378
|
+
obj.ethereumStorage = ProofEthereumStorage.toJSON(message.payload.ethereumStorage);
|
|
2379
|
+
}
|
|
2380
|
+
if (message.payload?.$case === "ethereumAccount") {
|
|
2381
|
+
obj.ethereumAccount = ProofEthereumAccount.toJSON(message.payload.ethereumAccount);
|
|
2382
|
+
}
|
|
2383
|
+
if (message.payload?.$case === "ca") {
|
|
2384
|
+
obj.ca = ProofCA.toJSON(message.payload.ca);
|
|
2385
|
+
}
|
|
2386
|
+
if (message.payload?.$case === "arbo") {
|
|
2387
|
+
obj.arbo = ProofArbo.toJSON(message.payload.arbo);
|
|
2388
|
+
}
|
|
2389
|
+
if (message.payload?.$case === "zkSnark") {
|
|
2390
|
+
obj.zkSnark = ProofZkSNARK.toJSON(message.payload.zkSnark);
|
|
2391
|
+
}
|
|
2392
|
+
if (message.payload?.$case === "minimeStorage") {
|
|
2393
|
+
obj.minimeStorage = ProofMinime.toJSON(message.payload.minimeStorage);
|
|
2394
|
+
}
|
|
2357
2395
|
return obj;
|
|
2358
2396
|
},
|
|
2359
2397
|
create(base) {
|
|
@@ -2398,7 +2436,7 @@ var Proof = {
|
|
|
2398
2436
|
}
|
|
2399
2437
|
};
|
|
2400
2438
|
function createBaseProofGraviton() {
|
|
2401
|
-
return { siblings: new Uint8Array() };
|
|
2439
|
+
return { siblings: new Uint8Array(0) };
|
|
2402
2440
|
}
|
|
2403
2441
|
var ProofGraviton = {
|
|
2404
2442
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2415,13 +2453,13 @@ var ProofGraviton = {
|
|
|
2415
2453
|
const tag = reader.uint32();
|
|
2416
2454
|
switch (tag >>> 3) {
|
|
2417
2455
|
case 1:
|
|
2418
|
-
if (tag
|
|
2456
|
+
if (tag !== 10) {
|
|
2419
2457
|
break;
|
|
2420
2458
|
}
|
|
2421
2459
|
message.siblings = reader.bytes();
|
|
2422
2460
|
continue;
|
|
2423
2461
|
}
|
|
2424
|
-
if ((tag & 7)
|
|
2462
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2425
2463
|
break;
|
|
2426
2464
|
}
|
|
2427
2465
|
reader.skipType(tag & 7);
|
|
@@ -2429,11 +2467,13 @@ var ProofGraviton = {
|
|
|
2429
2467
|
return message;
|
|
2430
2468
|
},
|
|
2431
2469
|
fromJSON(object) {
|
|
2432
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array() };
|
|
2470
|
+
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2433
2471
|
},
|
|
2434
2472
|
toJSON(message) {
|
|
2435
2473
|
const obj = {};
|
|
2436
|
-
|
|
2474
|
+
if (message.siblings.length !== 0) {
|
|
2475
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
2476
|
+
}
|
|
2437
2477
|
return obj;
|
|
2438
2478
|
},
|
|
2439
2479
|
create(base) {
|
|
@@ -2441,12 +2481,12 @@ var ProofGraviton = {
|
|
|
2441
2481
|
},
|
|
2442
2482
|
fromPartial(object) {
|
|
2443
2483
|
const message = createBaseProofGraviton();
|
|
2444
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2484
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2445
2485
|
return message;
|
|
2446
2486
|
}
|
|
2447
2487
|
};
|
|
2448
2488
|
function createBaseProofIden3() {
|
|
2449
|
-
return { siblings: new Uint8Array() };
|
|
2489
|
+
return { siblings: new Uint8Array(0) };
|
|
2450
2490
|
}
|
|
2451
2491
|
var ProofIden3 = {
|
|
2452
2492
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2463,13 +2503,13 @@ var ProofIden3 = {
|
|
|
2463
2503
|
const tag = reader.uint32();
|
|
2464
2504
|
switch (tag >>> 3) {
|
|
2465
2505
|
case 1:
|
|
2466
|
-
if (tag
|
|
2506
|
+
if (tag !== 10) {
|
|
2467
2507
|
break;
|
|
2468
2508
|
}
|
|
2469
2509
|
message.siblings = reader.bytes();
|
|
2470
2510
|
continue;
|
|
2471
2511
|
}
|
|
2472
|
-
if ((tag & 7)
|
|
2512
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2473
2513
|
break;
|
|
2474
2514
|
}
|
|
2475
2515
|
reader.skipType(tag & 7);
|
|
@@ -2477,11 +2517,13 @@ var ProofIden3 = {
|
|
|
2477
2517
|
return message;
|
|
2478
2518
|
},
|
|
2479
2519
|
fromJSON(object) {
|
|
2480
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array() };
|
|
2520
|
+
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2481
2521
|
},
|
|
2482
2522
|
toJSON(message) {
|
|
2483
2523
|
const obj = {};
|
|
2484
|
-
|
|
2524
|
+
if (message.siblings.length !== 0) {
|
|
2525
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
2526
|
+
}
|
|
2485
2527
|
return obj;
|
|
2486
2528
|
},
|
|
2487
2529
|
create(base) {
|
|
@@ -2489,12 +2531,12 @@ var ProofIden3 = {
|
|
|
2489
2531
|
},
|
|
2490
2532
|
fromPartial(object) {
|
|
2491
2533
|
const message = createBaseProofIden3();
|
|
2492
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2534
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2493
2535
|
return message;
|
|
2494
2536
|
}
|
|
2495
2537
|
};
|
|
2496
2538
|
function createBaseProofEthereumStorage() {
|
|
2497
|
-
return { key: new Uint8Array(), value: new Uint8Array(), siblings: [] };
|
|
2539
|
+
return { key: new Uint8Array(0), value: new Uint8Array(0), siblings: [] };
|
|
2498
2540
|
}
|
|
2499
2541
|
var ProofEthereumStorage = {
|
|
2500
2542
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2517,25 +2559,25 @@ var ProofEthereumStorage = {
|
|
|
2517
2559
|
const tag = reader.uint32();
|
|
2518
2560
|
switch (tag >>> 3) {
|
|
2519
2561
|
case 1:
|
|
2520
|
-
if (tag
|
|
2562
|
+
if (tag !== 10) {
|
|
2521
2563
|
break;
|
|
2522
2564
|
}
|
|
2523
2565
|
message.key = reader.bytes();
|
|
2524
2566
|
continue;
|
|
2525
2567
|
case 2:
|
|
2526
|
-
if (tag
|
|
2568
|
+
if (tag !== 18) {
|
|
2527
2569
|
break;
|
|
2528
2570
|
}
|
|
2529
2571
|
message.value = reader.bytes();
|
|
2530
2572
|
continue;
|
|
2531
2573
|
case 3:
|
|
2532
|
-
if (tag
|
|
2574
|
+
if (tag !== 26) {
|
|
2533
2575
|
break;
|
|
2534
2576
|
}
|
|
2535
2577
|
message.siblings.push(reader.bytes());
|
|
2536
2578
|
continue;
|
|
2537
2579
|
}
|
|
2538
|
-
if ((tag & 7)
|
|
2580
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2539
2581
|
break;
|
|
2540
2582
|
}
|
|
2541
2583
|
reader.skipType(tag & 7);
|
|
@@ -2544,19 +2586,21 @@ var ProofEthereumStorage = {
|
|
|
2544
2586
|
},
|
|
2545
2587
|
fromJSON(object) {
|
|
2546
2588
|
return {
|
|
2547
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
|
2548
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
|
|
2589
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
2590
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
2549
2591
|
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2550
2592
|
};
|
|
2551
2593
|
},
|
|
2552
2594
|
toJSON(message) {
|
|
2553
2595
|
const obj = {};
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2596
|
+
if (message.key.length !== 0) {
|
|
2597
|
+
obj.key = base64FromBytes(message.key);
|
|
2598
|
+
}
|
|
2599
|
+
if (message.value.length !== 0) {
|
|
2600
|
+
obj.value = base64FromBytes(message.value);
|
|
2601
|
+
}
|
|
2602
|
+
if (message.siblings?.length) {
|
|
2603
|
+
obj.siblings = message.siblings.map((e) => base64FromBytes(e));
|
|
2560
2604
|
}
|
|
2561
2605
|
return obj;
|
|
2562
2606
|
},
|
|
@@ -2565,18 +2609,18 @@ var ProofEthereumStorage = {
|
|
|
2565
2609
|
},
|
|
2566
2610
|
fromPartial(object) {
|
|
2567
2611
|
const message = createBaseProofEthereumStorage();
|
|
2568
|
-
message.key = object.key ?? new Uint8Array();
|
|
2569
|
-
message.value = object.value ?? new Uint8Array();
|
|
2612
|
+
message.key = object.key ?? new Uint8Array(0);
|
|
2613
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
2570
2614
|
message.siblings = object.siblings?.map((e) => e) || [];
|
|
2571
2615
|
return message;
|
|
2572
2616
|
}
|
|
2573
2617
|
};
|
|
2574
2618
|
function createBaseProofEthereumAccount() {
|
|
2575
2619
|
return {
|
|
2576
|
-
nonce: new Uint8Array(),
|
|
2577
|
-
balance: new Uint8Array(),
|
|
2578
|
-
storageHash: new Uint8Array(),
|
|
2579
|
-
codeHash: new Uint8Array(),
|
|
2620
|
+
nonce: new Uint8Array(0),
|
|
2621
|
+
balance: new Uint8Array(0),
|
|
2622
|
+
storageHash: new Uint8Array(0),
|
|
2623
|
+
codeHash: new Uint8Array(0),
|
|
2580
2624
|
siblings: []
|
|
2581
2625
|
};
|
|
2582
2626
|
}
|
|
@@ -2607,37 +2651,37 @@ var ProofEthereumAccount = {
|
|
|
2607
2651
|
const tag = reader.uint32();
|
|
2608
2652
|
switch (tag >>> 3) {
|
|
2609
2653
|
case 1:
|
|
2610
|
-
if (tag
|
|
2654
|
+
if (tag !== 10) {
|
|
2611
2655
|
break;
|
|
2612
2656
|
}
|
|
2613
2657
|
message.nonce = reader.bytes();
|
|
2614
2658
|
continue;
|
|
2615
2659
|
case 2:
|
|
2616
|
-
if (tag
|
|
2660
|
+
if (tag !== 18) {
|
|
2617
2661
|
break;
|
|
2618
2662
|
}
|
|
2619
2663
|
message.balance = reader.bytes();
|
|
2620
2664
|
continue;
|
|
2621
2665
|
case 3:
|
|
2622
|
-
if (tag
|
|
2666
|
+
if (tag !== 26) {
|
|
2623
2667
|
break;
|
|
2624
2668
|
}
|
|
2625
2669
|
message.storageHash = reader.bytes();
|
|
2626
2670
|
continue;
|
|
2627
2671
|
case 4:
|
|
2628
|
-
if (tag
|
|
2672
|
+
if (tag !== 34) {
|
|
2629
2673
|
break;
|
|
2630
2674
|
}
|
|
2631
2675
|
message.codeHash = reader.bytes();
|
|
2632
2676
|
continue;
|
|
2633
2677
|
case 5:
|
|
2634
|
-
if (tag
|
|
2678
|
+
if (tag !== 42) {
|
|
2635
2679
|
break;
|
|
2636
2680
|
}
|
|
2637
2681
|
message.siblings.push(reader.bytes());
|
|
2638
2682
|
continue;
|
|
2639
2683
|
}
|
|
2640
|
-
if ((tag & 7)
|
|
2684
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2641
2685
|
break;
|
|
2642
2686
|
}
|
|
2643
2687
|
reader.skipType(tag & 7);
|
|
@@ -2646,23 +2690,29 @@ var ProofEthereumAccount = {
|
|
|
2646
2690
|
},
|
|
2647
2691
|
fromJSON(object) {
|
|
2648
2692
|
return {
|
|
2649
|
-
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(),
|
|
2650
|
-
balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(),
|
|
2651
|
-
storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(),
|
|
2652
|
-
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(),
|
|
2693
|
+
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(0),
|
|
2694
|
+
balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(0),
|
|
2695
|
+
storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(0),
|
|
2696
|
+
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
|
|
2653
2697
|
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2654
2698
|
};
|
|
2655
2699
|
},
|
|
2656
2700
|
toJSON(message) {
|
|
2657
2701
|
const obj = {};
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
obj.
|
|
2702
|
+
if (message.nonce.length !== 0) {
|
|
2703
|
+
obj.nonce = base64FromBytes(message.nonce);
|
|
2704
|
+
}
|
|
2705
|
+
if (message.balance.length !== 0) {
|
|
2706
|
+
obj.balance = base64FromBytes(message.balance);
|
|
2707
|
+
}
|
|
2708
|
+
if (message.storageHash.length !== 0) {
|
|
2709
|
+
obj.storageHash = base64FromBytes(message.storageHash);
|
|
2710
|
+
}
|
|
2711
|
+
if (message.codeHash.length !== 0) {
|
|
2712
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
2713
|
+
}
|
|
2714
|
+
if (message.siblings?.length) {
|
|
2715
|
+
obj.siblings = message.siblings.map((e) => base64FromBytes(e));
|
|
2666
2716
|
}
|
|
2667
2717
|
return obj;
|
|
2668
2718
|
},
|
|
@@ -2671,10 +2721,10 @@ var ProofEthereumAccount = {
|
|
|
2671
2721
|
},
|
|
2672
2722
|
fromPartial(object) {
|
|
2673
2723
|
const message = createBaseProofEthereumAccount();
|
|
2674
|
-
message.nonce = object.nonce ?? new Uint8Array();
|
|
2675
|
-
message.balance = object.balance ?? new Uint8Array();
|
|
2676
|
-
message.storageHash = object.storageHash ?? new Uint8Array();
|
|
2677
|
-
message.codeHash = object.codeHash ?? new Uint8Array();
|
|
2724
|
+
message.nonce = object.nonce ?? new Uint8Array(0);
|
|
2725
|
+
message.balance = object.balance ?? new Uint8Array(0);
|
|
2726
|
+
message.storageHash = object.storageHash ?? new Uint8Array(0);
|
|
2727
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
2678
2728
|
message.siblings = object.siblings?.map((e) => e) || [];
|
|
2679
2729
|
return message;
|
|
2680
2730
|
}
|
|
@@ -2700,19 +2750,19 @@ var ProofMinime = {
|
|
|
2700
2750
|
const tag = reader.uint32();
|
|
2701
2751
|
switch (tag >>> 3) {
|
|
2702
2752
|
case 1:
|
|
2703
|
-
if (tag
|
|
2753
|
+
if (tag !== 10) {
|
|
2704
2754
|
break;
|
|
2705
2755
|
}
|
|
2706
2756
|
message.proofPrevBlock = ProofEthereumStorage.decode(reader, reader.uint32());
|
|
2707
2757
|
continue;
|
|
2708
2758
|
case 2:
|
|
2709
|
-
if (tag
|
|
2759
|
+
if (tag !== 18) {
|
|
2710
2760
|
break;
|
|
2711
2761
|
}
|
|
2712
2762
|
message.proofNextBlock = ProofEthereumStorage.decode(reader, reader.uint32());
|
|
2713
2763
|
continue;
|
|
2714
2764
|
}
|
|
2715
|
-
if ((tag & 7)
|
|
2765
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2716
2766
|
break;
|
|
2717
2767
|
}
|
|
2718
2768
|
reader.skipType(tag & 7);
|
|
@@ -2727,8 +2777,12 @@ var ProofMinime = {
|
|
|
2727
2777
|
},
|
|
2728
2778
|
toJSON(message) {
|
|
2729
2779
|
const obj = {};
|
|
2730
|
-
message.proofPrevBlock !== void 0
|
|
2731
|
-
|
|
2780
|
+
if (message.proofPrevBlock !== void 0) {
|
|
2781
|
+
obj.proofPrevBlock = ProofEthereumStorage.toJSON(message.proofPrevBlock);
|
|
2782
|
+
}
|
|
2783
|
+
if (message.proofNextBlock !== void 0) {
|
|
2784
|
+
obj.proofNextBlock = ProofEthereumStorage.toJSON(message.proofNextBlock);
|
|
2785
|
+
}
|
|
2732
2786
|
return obj;
|
|
2733
2787
|
},
|
|
2734
2788
|
create(base) {
|
|
@@ -2742,7 +2796,7 @@ var ProofMinime = {
|
|
|
2742
2796
|
}
|
|
2743
2797
|
};
|
|
2744
2798
|
function createBaseProofCA() {
|
|
2745
|
-
return { type: 0, bundle: void 0, signature: new Uint8Array() };
|
|
2799
|
+
return { type: 0, bundle: void 0, signature: new Uint8Array(0) };
|
|
2746
2800
|
}
|
|
2747
2801
|
var ProofCA = {
|
|
2748
2802
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2765,25 +2819,25 @@ var ProofCA = {
|
|
|
2765
2819
|
const tag = reader.uint32();
|
|
2766
2820
|
switch (tag >>> 3) {
|
|
2767
2821
|
case 1:
|
|
2768
|
-
if (tag
|
|
2822
|
+
if (tag !== 8) {
|
|
2769
2823
|
break;
|
|
2770
2824
|
}
|
|
2771
2825
|
message.type = reader.int32();
|
|
2772
2826
|
continue;
|
|
2773
2827
|
case 2:
|
|
2774
|
-
if (tag
|
|
2828
|
+
if (tag !== 18) {
|
|
2775
2829
|
break;
|
|
2776
2830
|
}
|
|
2777
2831
|
message.bundle = CAbundle.decode(reader, reader.uint32());
|
|
2778
2832
|
continue;
|
|
2779
2833
|
case 3:
|
|
2780
|
-
if (tag
|
|
2834
|
+
if (tag !== 26) {
|
|
2781
2835
|
break;
|
|
2782
2836
|
}
|
|
2783
2837
|
message.signature = reader.bytes();
|
|
2784
2838
|
continue;
|
|
2785
2839
|
}
|
|
2786
|
-
if ((tag & 7)
|
|
2840
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2787
2841
|
break;
|
|
2788
2842
|
}
|
|
2789
2843
|
reader.skipType(tag & 7);
|
|
@@ -2794,14 +2848,20 @@ var ProofCA = {
|
|
|
2794
2848
|
return {
|
|
2795
2849
|
type: isSet(object.type) ? proofCA_TypeFromJSON(object.type) : 0,
|
|
2796
2850
|
bundle: isSet(object.bundle) ? CAbundle.fromJSON(object.bundle) : void 0,
|
|
2797
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array()
|
|
2851
|
+
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0)
|
|
2798
2852
|
};
|
|
2799
2853
|
},
|
|
2800
2854
|
toJSON(message) {
|
|
2801
2855
|
const obj = {};
|
|
2802
|
-
message.type !==
|
|
2803
|
-
|
|
2804
|
-
|
|
2856
|
+
if (message.type !== 0) {
|
|
2857
|
+
obj.type = proofCA_TypeToJSON(message.type);
|
|
2858
|
+
}
|
|
2859
|
+
if (message.bundle !== void 0) {
|
|
2860
|
+
obj.bundle = CAbundle.toJSON(message.bundle);
|
|
2861
|
+
}
|
|
2862
|
+
if (message.signature.length !== 0) {
|
|
2863
|
+
obj.signature = base64FromBytes(message.signature);
|
|
2864
|
+
}
|
|
2805
2865
|
return obj;
|
|
2806
2866
|
},
|
|
2807
2867
|
create(base) {
|
|
@@ -2811,12 +2871,12 @@ var ProofCA = {
|
|
|
2811
2871
|
const message = createBaseProofCA();
|
|
2812
2872
|
message.type = object.type ?? 0;
|
|
2813
2873
|
message.bundle = object.bundle !== void 0 && object.bundle !== null ? CAbundle.fromPartial(object.bundle) : void 0;
|
|
2814
|
-
message.signature = object.signature ?? new Uint8Array();
|
|
2874
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
2815
2875
|
return message;
|
|
2816
2876
|
}
|
|
2817
2877
|
};
|
|
2818
2878
|
function createBaseCAbundle() {
|
|
2819
|
-
return { processId: new Uint8Array(), address: new Uint8Array() };
|
|
2879
|
+
return { processId: new Uint8Array(0), address: new Uint8Array(0) };
|
|
2820
2880
|
}
|
|
2821
2881
|
var CAbundle = {
|
|
2822
2882
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2836,19 +2896,19 @@ var CAbundle = {
|
|
|
2836
2896
|
const tag = reader.uint32();
|
|
2837
2897
|
switch (tag >>> 3) {
|
|
2838
2898
|
case 1:
|
|
2839
|
-
if (tag
|
|
2899
|
+
if (tag !== 10) {
|
|
2840
2900
|
break;
|
|
2841
2901
|
}
|
|
2842
2902
|
message.processId = reader.bytes();
|
|
2843
2903
|
continue;
|
|
2844
2904
|
case 2:
|
|
2845
|
-
if (tag
|
|
2905
|
+
if (tag !== 18) {
|
|
2846
2906
|
break;
|
|
2847
2907
|
}
|
|
2848
2908
|
message.address = reader.bytes();
|
|
2849
2909
|
continue;
|
|
2850
2910
|
}
|
|
2851
|
-
if ((tag & 7)
|
|
2911
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2852
2912
|
break;
|
|
2853
2913
|
}
|
|
2854
2914
|
reader.skipType(tag & 7);
|
|
@@ -2857,14 +2917,18 @@ var CAbundle = {
|
|
|
2857
2917
|
},
|
|
2858
2918
|
fromJSON(object) {
|
|
2859
2919
|
return {
|
|
2860
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
2861
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array()
|
|
2920
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
2921
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0)
|
|
2862
2922
|
};
|
|
2863
2923
|
},
|
|
2864
2924
|
toJSON(message) {
|
|
2865
2925
|
const obj = {};
|
|
2866
|
-
|
|
2867
|
-
|
|
2926
|
+
if (message.processId.length !== 0) {
|
|
2927
|
+
obj.processId = base64FromBytes(message.processId);
|
|
2928
|
+
}
|
|
2929
|
+
if (message.address.length !== 0) {
|
|
2930
|
+
obj.address = base64FromBytes(message.address);
|
|
2931
|
+
}
|
|
2868
2932
|
return obj;
|
|
2869
2933
|
},
|
|
2870
2934
|
create(base) {
|
|
@@ -2872,18 +2936,18 @@ var CAbundle = {
|
|
|
2872
2936
|
},
|
|
2873
2937
|
fromPartial(object) {
|
|
2874
2938
|
const message = createBaseCAbundle();
|
|
2875
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
2876
|
-
message.address = object.address ?? new Uint8Array();
|
|
2939
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
2940
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
2877
2941
|
return message;
|
|
2878
2942
|
}
|
|
2879
2943
|
};
|
|
2880
2944
|
function createBaseProofArbo() {
|
|
2881
2945
|
return {
|
|
2882
2946
|
type: 0,
|
|
2883
|
-
siblings: new Uint8Array(),
|
|
2884
|
-
|
|
2947
|
+
siblings: new Uint8Array(0),
|
|
2948
|
+
availableWeight: new Uint8Array(0),
|
|
2885
2949
|
keyType: 0,
|
|
2886
|
-
|
|
2950
|
+
voteWeight: new Uint8Array(0)
|
|
2887
2951
|
};
|
|
2888
2952
|
}
|
|
2889
2953
|
var ProofArbo = {
|
|
@@ -2894,14 +2958,14 @@ var ProofArbo = {
|
|
|
2894
2958
|
if (message.siblings.length !== 0) {
|
|
2895
2959
|
writer.uint32(18).bytes(message.siblings);
|
|
2896
2960
|
}
|
|
2897
|
-
if (message.
|
|
2898
|
-
writer.uint32(26).bytes(message.
|
|
2961
|
+
if (message.availableWeight.length !== 0) {
|
|
2962
|
+
writer.uint32(26).bytes(message.availableWeight);
|
|
2899
2963
|
}
|
|
2900
2964
|
if (message.keyType !== 0) {
|
|
2901
2965
|
writer.uint32(32).int32(message.keyType);
|
|
2902
2966
|
}
|
|
2903
|
-
if (message.
|
|
2904
|
-
writer.uint32(42).bytes(message.
|
|
2967
|
+
if (message.voteWeight.length !== 0) {
|
|
2968
|
+
writer.uint32(42).bytes(message.voteWeight);
|
|
2905
2969
|
}
|
|
2906
2970
|
return writer;
|
|
2907
2971
|
},
|
|
@@ -2913,37 +2977,37 @@ var ProofArbo = {
|
|
|
2913
2977
|
const tag = reader.uint32();
|
|
2914
2978
|
switch (tag >>> 3) {
|
|
2915
2979
|
case 1:
|
|
2916
|
-
if (tag
|
|
2980
|
+
if (tag !== 8) {
|
|
2917
2981
|
break;
|
|
2918
2982
|
}
|
|
2919
2983
|
message.type = reader.int32();
|
|
2920
2984
|
continue;
|
|
2921
2985
|
case 2:
|
|
2922
|
-
if (tag
|
|
2986
|
+
if (tag !== 18) {
|
|
2923
2987
|
break;
|
|
2924
2988
|
}
|
|
2925
2989
|
message.siblings = reader.bytes();
|
|
2926
2990
|
continue;
|
|
2927
2991
|
case 3:
|
|
2928
|
-
if (tag
|
|
2992
|
+
if (tag !== 26) {
|
|
2929
2993
|
break;
|
|
2930
2994
|
}
|
|
2931
|
-
message.
|
|
2995
|
+
message.availableWeight = reader.bytes();
|
|
2932
2996
|
continue;
|
|
2933
2997
|
case 4:
|
|
2934
|
-
if (tag
|
|
2998
|
+
if (tag !== 32) {
|
|
2935
2999
|
break;
|
|
2936
3000
|
}
|
|
2937
3001
|
message.keyType = reader.int32();
|
|
2938
3002
|
continue;
|
|
2939
3003
|
case 5:
|
|
2940
|
-
if (tag
|
|
3004
|
+
if (tag !== 42) {
|
|
2941
3005
|
break;
|
|
2942
3006
|
}
|
|
2943
|
-
message.
|
|
3007
|
+
message.voteWeight = reader.bytes();
|
|
2944
3008
|
continue;
|
|
2945
3009
|
}
|
|
2946
|
-
if ((tag & 7)
|
|
3010
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2947
3011
|
break;
|
|
2948
3012
|
}
|
|
2949
3013
|
reader.skipType(tag & 7);
|
|
@@ -2953,21 +3017,29 @@ var ProofArbo = {
|
|
|
2953
3017
|
fromJSON(object) {
|
|
2954
3018
|
return {
|
|
2955
3019
|
type: isSet(object.type) ? proofArbo_TypeFromJSON(object.type) : 0,
|
|
2956
|
-
siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(),
|
|
2957
|
-
|
|
3020
|
+
siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0),
|
|
3021
|
+
availableWeight: isSet(object.availableWeight) ? bytesFromBase64(object.availableWeight) : new Uint8Array(0),
|
|
2958
3022
|
keyType: isSet(object.keyType) ? proofArbo_KeyTypeFromJSON(object.keyType) : 0,
|
|
2959
|
-
|
|
3023
|
+
voteWeight: isSet(object.voteWeight) ? bytesFromBase64(object.voteWeight) : new Uint8Array(0)
|
|
2960
3024
|
};
|
|
2961
3025
|
},
|
|
2962
3026
|
toJSON(message) {
|
|
2963
3027
|
const obj = {};
|
|
2964
|
-
message.type !==
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
message.
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
)
|
|
3028
|
+
if (message.type !== 0) {
|
|
3029
|
+
obj.type = proofArbo_TypeToJSON(message.type);
|
|
3030
|
+
}
|
|
3031
|
+
if (message.siblings.length !== 0) {
|
|
3032
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
3033
|
+
}
|
|
3034
|
+
if (message.availableWeight.length !== 0) {
|
|
3035
|
+
obj.availableWeight = base64FromBytes(message.availableWeight);
|
|
3036
|
+
}
|
|
3037
|
+
if (message.keyType !== 0) {
|
|
3038
|
+
obj.keyType = proofArbo_KeyTypeToJSON(message.keyType);
|
|
3039
|
+
}
|
|
3040
|
+
if (message.voteWeight.length !== 0) {
|
|
3041
|
+
obj.voteWeight = base64FromBytes(message.voteWeight);
|
|
3042
|
+
}
|
|
2971
3043
|
return obj;
|
|
2972
3044
|
},
|
|
2973
3045
|
create(base) {
|
|
@@ -2976,10 +3048,10 @@ var ProofArbo = {
|
|
|
2976
3048
|
fromPartial(object) {
|
|
2977
3049
|
const message = createBaseProofArbo();
|
|
2978
3050
|
message.type = object.type ?? 0;
|
|
2979
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2980
|
-
message.
|
|
3051
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
3052
|
+
message.availableWeight = object.availableWeight ?? new Uint8Array(0);
|
|
2981
3053
|
message.keyType = object.keyType ?? 0;
|
|
2982
|
-
message.
|
|
3054
|
+
message.voteWeight = object.voteWeight ?? new Uint8Array(0);
|
|
2983
3055
|
return message;
|
|
2984
3056
|
}
|
|
2985
3057
|
};
|
|
@@ -3013,37 +3085,37 @@ var ProofZkSNARK = {
|
|
|
3013
3085
|
const tag = reader.uint32();
|
|
3014
3086
|
switch (tag >>> 3) {
|
|
3015
3087
|
case 1:
|
|
3016
|
-
if (tag
|
|
3088
|
+
if (tag !== 8) {
|
|
3017
3089
|
break;
|
|
3018
3090
|
}
|
|
3019
3091
|
message.circuitParametersIndex = reader.int32();
|
|
3020
3092
|
continue;
|
|
3021
3093
|
case 2:
|
|
3022
|
-
if (tag
|
|
3094
|
+
if (tag !== 18) {
|
|
3023
3095
|
break;
|
|
3024
3096
|
}
|
|
3025
3097
|
message.a.push(reader.string());
|
|
3026
3098
|
continue;
|
|
3027
3099
|
case 3:
|
|
3028
|
-
if (tag
|
|
3100
|
+
if (tag !== 26) {
|
|
3029
3101
|
break;
|
|
3030
3102
|
}
|
|
3031
3103
|
message.b.push(reader.string());
|
|
3032
3104
|
continue;
|
|
3033
3105
|
case 4:
|
|
3034
|
-
if (tag
|
|
3106
|
+
if (tag !== 34) {
|
|
3035
3107
|
break;
|
|
3036
3108
|
}
|
|
3037
3109
|
message.c.push(reader.string());
|
|
3038
3110
|
continue;
|
|
3039
3111
|
case 5:
|
|
3040
|
-
if (tag
|
|
3112
|
+
if (tag !== 42) {
|
|
3041
3113
|
break;
|
|
3042
3114
|
}
|
|
3043
3115
|
message.publicInputs.push(reader.string());
|
|
3044
3116
|
continue;
|
|
3045
3117
|
}
|
|
3046
|
-
if ((tag & 7)
|
|
3118
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3047
3119
|
break;
|
|
3048
3120
|
}
|
|
3049
3121
|
reader.skipType(tag & 7);
|
|
@@ -3061,26 +3133,20 @@ var ProofZkSNARK = {
|
|
|
3061
3133
|
},
|
|
3062
3134
|
toJSON(message) {
|
|
3063
3135
|
const obj = {};
|
|
3064
|
-
message.circuitParametersIndex !==
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
obj.a =
|
|
3069
|
-
}
|
|
3070
|
-
if (message.b) {
|
|
3071
|
-
obj.b = message.b
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
obj.c = [];
|
|
3079
|
-
}
|
|
3080
|
-
if (message.publicInputs) {
|
|
3081
|
-
obj.publicInputs = message.publicInputs.map((e) => e);
|
|
3082
|
-
} else {
|
|
3083
|
-
obj.publicInputs = [];
|
|
3136
|
+
if (message.circuitParametersIndex !== 0) {
|
|
3137
|
+
obj.circuitParametersIndex = Math.round(message.circuitParametersIndex);
|
|
3138
|
+
}
|
|
3139
|
+
if (message.a?.length) {
|
|
3140
|
+
obj.a = message.a;
|
|
3141
|
+
}
|
|
3142
|
+
if (message.b?.length) {
|
|
3143
|
+
obj.b = message.b;
|
|
3144
|
+
}
|
|
3145
|
+
if (message.c?.length) {
|
|
3146
|
+
obj.c = message.c;
|
|
3147
|
+
}
|
|
3148
|
+
if (message.publicInputs?.length) {
|
|
3149
|
+
obj.publicInputs = message.publicInputs;
|
|
3084
3150
|
}
|
|
3085
3151
|
return obj;
|
|
3086
3152
|
},
|
|
@@ -3127,37 +3193,37 @@ var Account = {
|
|
|
3127
3193
|
const tag = reader.uint32();
|
|
3128
3194
|
switch (tag >>> 3) {
|
|
3129
3195
|
case 1:
|
|
3130
|
-
if (tag
|
|
3196
|
+
if (tag !== 8) {
|
|
3131
3197
|
break;
|
|
3132
3198
|
}
|
|
3133
3199
|
message.balance = longToNumber(reader.uint64());
|
|
3134
3200
|
continue;
|
|
3135
3201
|
case 2:
|
|
3136
|
-
if (tag
|
|
3202
|
+
if (tag !== 16) {
|
|
3137
3203
|
break;
|
|
3138
3204
|
}
|
|
3139
3205
|
message.nonce = reader.uint32();
|
|
3140
3206
|
continue;
|
|
3141
3207
|
case 3:
|
|
3142
|
-
if (tag
|
|
3208
|
+
if (tag !== 26) {
|
|
3143
3209
|
break;
|
|
3144
3210
|
}
|
|
3145
3211
|
message.infoURI = reader.string();
|
|
3146
3212
|
continue;
|
|
3147
3213
|
case 4:
|
|
3148
|
-
if (tag
|
|
3214
|
+
if (tag !== 34) {
|
|
3149
3215
|
break;
|
|
3150
3216
|
}
|
|
3151
3217
|
message.delegateAddrs.push(reader.bytes());
|
|
3152
3218
|
continue;
|
|
3153
3219
|
case 5:
|
|
3154
|
-
if (tag
|
|
3220
|
+
if (tag !== 40) {
|
|
3155
3221
|
break;
|
|
3156
3222
|
}
|
|
3157
3223
|
message.processIndex = reader.uint32();
|
|
3158
3224
|
continue;
|
|
3159
3225
|
}
|
|
3160
|
-
if ((tag & 7)
|
|
3226
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3161
3227
|
break;
|
|
3162
3228
|
}
|
|
3163
3229
|
reader.skipType(tag & 7);
|
|
@@ -3175,15 +3241,21 @@ var Account = {
|
|
|
3175
3241
|
},
|
|
3176
3242
|
toJSON(message) {
|
|
3177
3243
|
const obj = {};
|
|
3178
|
-
message.balance !==
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
if (message.
|
|
3182
|
-
obj.
|
|
3183
|
-
}
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3244
|
+
if (message.balance !== 0) {
|
|
3245
|
+
obj.balance = Math.round(message.balance);
|
|
3246
|
+
}
|
|
3247
|
+
if (message.nonce !== 0) {
|
|
3248
|
+
obj.nonce = Math.round(message.nonce);
|
|
3249
|
+
}
|
|
3250
|
+
if (message.infoURI !== "") {
|
|
3251
|
+
obj.infoURI = message.infoURI;
|
|
3252
|
+
}
|
|
3253
|
+
if (message.delegateAddrs?.length) {
|
|
3254
|
+
obj.delegateAddrs = message.delegateAddrs.map((e) => base64FromBytes(e));
|
|
3255
|
+
}
|
|
3256
|
+
if (message.processIndex !== 0) {
|
|
3257
|
+
obj.processIndex = Math.round(message.processIndex);
|
|
3258
|
+
}
|
|
3187
3259
|
return obj;
|
|
3188
3260
|
},
|
|
3189
3261
|
create(base) {
|
|
@@ -3200,7 +3272,7 @@ var Account = {
|
|
|
3200
3272
|
}
|
|
3201
3273
|
};
|
|
3202
3274
|
function createBaseTreasurer() {
|
|
3203
|
-
return { address: new Uint8Array(), nonce: 0 };
|
|
3275
|
+
return { address: new Uint8Array(0), nonce: 0 };
|
|
3204
3276
|
}
|
|
3205
3277
|
var Treasurer = {
|
|
3206
3278
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3220,19 +3292,19 @@ var Treasurer = {
|
|
|
3220
3292
|
const tag = reader.uint32();
|
|
3221
3293
|
switch (tag >>> 3) {
|
|
3222
3294
|
case 1:
|
|
3223
|
-
if (tag
|
|
3295
|
+
if (tag !== 10) {
|
|
3224
3296
|
break;
|
|
3225
3297
|
}
|
|
3226
3298
|
message.address = reader.bytes();
|
|
3227
3299
|
continue;
|
|
3228
3300
|
case 2:
|
|
3229
|
-
if (tag
|
|
3301
|
+
if (tag !== 16) {
|
|
3230
3302
|
break;
|
|
3231
3303
|
}
|
|
3232
3304
|
message.nonce = reader.uint32();
|
|
3233
3305
|
continue;
|
|
3234
3306
|
}
|
|
3235
|
-
if ((tag & 7)
|
|
3307
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3236
3308
|
break;
|
|
3237
3309
|
}
|
|
3238
3310
|
reader.skipType(tag & 7);
|
|
@@ -3241,14 +3313,18 @@ var Treasurer = {
|
|
|
3241
3313
|
},
|
|
3242
3314
|
fromJSON(object) {
|
|
3243
3315
|
return {
|
|
3244
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
|
|
3316
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
3245
3317
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0
|
|
3246
3318
|
};
|
|
3247
3319
|
},
|
|
3248
3320
|
toJSON(message) {
|
|
3249
3321
|
const obj = {};
|
|
3250
|
-
|
|
3251
|
-
|
|
3322
|
+
if (message.address.length !== 0) {
|
|
3323
|
+
obj.address = base64FromBytes(message.address);
|
|
3324
|
+
}
|
|
3325
|
+
if (message.nonce !== 0) {
|
|
3326
|
+
obj.nonce = Math.round(message.nonce);
|
|
3327
|
+
}
|
|
3252
3328
|
return obj;
|
|
3253
3329
|
},
|
|
3254
3330
|
create(base) {
|
|
@@ -3256,7 +3332,7 @@ var Treasurer = {
|
|
|
3256
3332
|
},
|
|
3257
3333
|
fromPartial(object) {
|
|
3258
3334
|
const message = createBaseTreasurer();
|
|
3259
|
-
message.address = object.address ?? new Uint8Array();
|
|
3335
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
3260
3336
|
message.nonce = object.nonce ?? 0;
|
|
3261
3337
|
return message;
|
|
3262
3338
|
}
|
|
@@ -3300,6 +3376,12 @@ var Tx = {
|
|
|
3300
3376
|
case "setKeykeeper":
|
|
3301
3377
|
SetKeykeeperTx.encode(message.payload.setKeykeeper, writer.uint32(90).fork()).ldelim();
|
|
3302
3378
|
break;
|
|
3379
|
+
case "setSik":
|
|
3380
|
+
SikTx.encode(message.payload.setSik, writer.uint32(98).fork()).ldelim();
|
|
3381
|
+
break;
|
|
3382
|
+
case "delSik":
|
|
3383
|
+
SikTx.encode(message.payload.delSik, writer.uint32(106).fork()).ldelim();
|
|
3384
|
+
break;
|
|
3303
3385
|
}
|
|
3304
3386
|
return writer;
|
|
3305
3387
|
},
|
|
@@ -3311,49 +3393,49 @@ var Tx = {
|
|
|
3311
3393
|
const tag = reader.uint32();
|
|
3312
3394
|
switch (tag >>> 3) {
|
|
3313
3395
|
case 1:
|
|
3314
|
-
if (tag
|
|
3396
|
+
if (tag !== 10) {
|
|
3315
3397
|
break;
|
|
3316
3398
|
}
|
|
3317
3399
|
message.payload = { $case: "vote", vote: VoteEnvelope.decode(reader, reader.uint32()) };
|
|
3318
3400
|
continue;
|
|
3319
3401
|
case 2:
|
|
3320
|
-
if (tag
|
|
3402
|
+
if (tag !== 18) {
|
|
3321
3403
|
break;
|
|
3322
3404
|
}
|
|
3323
3405
|
message.payload = { $case: "newProcess", newProcess: NewProcessTx.decode(reader, reader.uint32()) };
|
|
3324
3406
|
continue;
|
|
3325
3407
|
case 3:
|
|
3326
|
-
if (tag
|
|
3408
|
+
if (tag !== 26) {
|
|
3327
3409
|
break;
|
|
3328
3410
|
}
|
|
3329
3411
|
message.payload = { $case: "admin", admin: AdminTx.decode(reader, reader.uint32()) };
|
|
3330
3412
|
continue;
|
|
3331
3413
|
case 4:
|
|
3332
|
-
if (tag
|
|
3414
|
+
if (tag !== 34) {
|
|
3333
3415
|
break;
|
|
3334
3416
|
}
|
|
3335
3417
|
message.payload = { $case: "setProcess", setProcess: SetProcessTx.decode(reader, reader.uint32()) };
|
|
3336
3418
|
continue;
|
|
3337
3419
|
case 5:
|
|
3338
|
-
if (tag
|
|
3420
|
+
if (tag !== 42) {
|
|
3339
3421
|
break;
|
|
3340
3422
|
}
|
|
3341
3423
|
message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.decode(reader, reader.uint32()) };
|
|
3342
3424
|
continue;
|
|
3343
3425
|
case 6:
|
|
3344
|
-
if (tag
|
|
3426
|
+
if (tag !== 50) {
|
|
3345
3427
|
break;
|
|
3346
3428
|
}
|
|
3347
3429
|
message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.decode(reader, reader.uint32()) };
|
|
3348
3430
|
continue;
|
|
3349
3431
|
case 7:
|
|
3350
|
-
if (tag
|
|
3432
|
+
if (tag !== 58) {
|
|
3351
3433
|
break;
|
|
3352
3434
|
}
|
|
3353
3435
|
message.payload = { $case: "sendTokens", sendTokens: SendTokensTx.decode(reader, reader.uint32()) };
|
|
3354
3436
|
continue;
|
|
3355
3437
|
case 8:
|
|
3356
|
-
if (tag
|
|
3438
|
+
if (tag !== 66) {
|
|
3357
3439
|
break;
|
|
3358
3440
|
}
|
|
3359
3441
|
message.payload = {
|
|
@@ -3362,25 +3444,37 @@ var Tx = {
|
|
|
3362
3444
|
};
|
|
3363
3445
|
continue;
|
|
3364
3446
|
case 9:
|
|
3365
|
-
if (tag
|
|
3447
|
+
if (tag !== 74) {
|
|
3366
3448
|
break;
|
|
3367
3449
|
}
|
|
3368
3450
|
message.payload = { $case: "setAccount", setAccount: SetAccountTx.decode(reader, reader.uint32()) };
|
|
3369
3451
|
continue;
|
|
3370
3452
|
case 10:
|
|
3371
|
-
if (tag
|
|
3453
|
+
if (tag !== 82) {
|
|
3372
3454
|
break;
|
|
3373
3455
|
}
|
|
3374
3456
|
message.payload = { $case: "collectFaucet", collectFaucet: CollectFaucetTx.decode(reader, reader.uint32()) };
|
|
3375
3457
|
continue;
|
|
3376
3458
|
case 11:
|
|
3377
|
-
if (tag
|
|
3459
|
+
if (tag !== 90) {
|
|
3378
3460
|
break;
|
|
3379
3461
|
}
|
|
3380
3462
|
message.payload = { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.decode(reader, reader.uint32()) };
|
|
3381
3463
|
continue;
|
|
3464
|
+
case 12:
|
|
3465
|
+
if (tag !== 98) {
|
|
3466
|
+
break;
|
|
3467
|
+
}
|
|
3468
|
+
message.payload = { $case: "setSik", setSik: SikTx.decode(reader, reader.uint32()) };
|
|
3469
|
+
continue;
|
|
3470
|
+
case 13:
|
|
3471
|
+
if (tag !== 106) {
|
|
3472
|
+
break;
|
|
3473
|
+
}
|
|
3474
|
+
message.payload = { $case: "delSik", delSik: SikTx.decode(reader, reader.uint32()) };
|
|
3475
|
+
continue;
|
|
3382
3476
|
}
|
|
3383
|
-
if ((tag & 7)
|
|
3477
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3384
3478
|
break;
|
|
3385
3479
|
}
|
|
3386
3480
|
reader.skipType(tag & 7);
|
|
@@ -3392,22 +3486,50 @@ var Tx = {
|
|
|
3392
3486
|
payload: isSet(object.vote) ? { $case: "vote", vote: VoteEnvelope.fromJSON(object.vote) } : isSet(object.newProcess) ? { $case: "newProcess", newProcess: NewProcessTx.fromJSON(object.newProcess) } : isSet(object.admin) ? { $case: "admin", admin: AdminTx.fromJSON(object.admin) } : isSet(object.setProcess) ? { $case: "setProcess", setProcess: SetProcessTx.fromJSON(object.setProcess) } : isSet(object.registerKey) ? { $case: "registerKey", registerKey: RegisterKeyTx.fromJSON(object.registerKey) } : isSet(object.mintTokens) ? { $case: "mintTokens", mintTokens: MintTokensTx.fromJSON(object.mintTokens) } : isSet(object.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet(object.setTransactionCosts) ? {
|
|
3393
3487
|
$case: "setTransactionCosts",
|
|
3394
3488
|
setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
|
|
3395
|
-
} : isSet(object.setAccount) ? { $case: "setAccount", setAccount: SetAccountTx.fromJSON(object.setAccount) } : isSet(object.collectFaucet) ? { $case: "collectFaucet", collectFaucet: CollectFaucetTx.fromJSON(object.collectFaucet) } : isSet(object.setKeykeeper) ? { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.fromJSON(object.setKeykeeper) } : void 0
|
|
3489
|
+
} : isSet(object.setAccount) ? { $case: "setAccount", setAccount: SetAccountTx.fromJSON(object.setAccount) } : isSet(object.collectFaucet) ? { $case: "collectFaucet", collectFaucet: CollectFaucetTx.fromJSON(object.collectFaucet) } : isSet(object.setKeykeeper) ? { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.fromJSON(object.setKeykeeper) } : isSet(object.setSik) ? { $case: "setSik", setSik: SikTx.fromJSON(object.setSik) } : isSet(object.delSik) ? { $case: "delSik", delSik: SikTx.fromJSON(object.delSik) } : void 0
|
|
3396
3490
|
};
|
|
3397
3491
|
},
|
|
3398
3492
|
toJSON(message) {
|
|
3399
3493
|
const obj = {};
|
|
3400
|
-
message.payload?.$case === "vote"
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
message.payload?.$case === "
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
message.payload?.$case === "
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
message.payload?.$case === "
|
|
3410
|
-
|
|
3494
|
+
if (message.payload?.$case === "vote") {
|
|
3495
|
+
obj.vote = VoteEnvelope.toJSON(message.payload.vote);
|
|
3496
|
+
}
|
|
3497
|
+
if (message.payload?.$case === "newProcess") {
|
|
3498
|
+
obj.newProcess = NewProcessTx.toJSON(message.payload.newProcess);
|
|
3499
|
+
}
|
|
3500
|
+
if (message.payload?.$case === "admin") {
|
|
3501
|
+
obj.admin = AdminTx.toJSON(message.payload.admin);
|
|
3502
|
+
}
|
|
3503
|
+
if (message.payload?.$case === "setProcess") {
|
|
3504
|
+
obj.setProcess = SetProcessTx.toJSON(message.payload.setProcess);
|
|
3505
|
+
}
|
|
3506
|
+
if (message.payload?.$case === "registerKey") {
|
|
3507
|
+
obj.registerKey = RegisterKeyTx.toJSON(message.payload.registerKey);
|
|
3508
|
+
}
|
|
3509
|
+
if (message.payload?.$case === "mintTokens") {
|
|
3510
|
+
obj.mintTokens = MintTokensTx.toJSON(message.payload.mintTokens);
|
|
3511
|
+
}
|
|
3512
|
+
if (message.payload?.$case === "sendTokens") {
|
|
3513
|
+
obj.sendTokens = SendTokensTx.toJSON(message.payload.sendTokens);
|
|
3514
|
+
}
|
|
3515
|
+
if (message.payload?.$case === "setTransactionCosts") {
|
|
3516
|
+
obj.setTransactionCosts = SetTransactionCostsTx.toJSON(message.payload.setTransactionCosts);
|
|
3517
|
+
}
|
|
3518
|
+
if (message.payload?.$case === "setAccount") {
|
|
3519
|
+
obj.setAccount = SetAccountTx.toJSON(message.payload.setAccount);
|
|
3520
|
+
}
|
|
3521
|
+
if (message.payload?.$case === "collectFaucet") {
|
|
3522
|
+
obj.collectFaucet = CollectFaucetTx.toJSON(message.payload.collectFaucet);
|
|
3523
|
+
}
|
|
3524
|
+
if (message.payload?.$case === "setKeykeeper") {
|
|
3525
|
+
obj.setKeykeeper = SetKeykeeperTx.toJSON(message.payload.setKeykeeper);
|
|
3526
|
+
}
|
|
3527
|
+
if (message.payload?.$case === "setSik") {
|
|
3528
|
+
obj.setSik = SikTx.toJSON(message.payload.setSik);
|
|
3529
|
+
}
|
|
3530
|
+
if (message.payload?.$case === "delSik") {
|
|
3531
|
+
obj.delSik = SikTx.toJSON(message.payload.delSik);
|
|
3532
|
+
}
|
|
3411
3533
|
return obj;
|
|
3412
3534
|
},
|
|
3413
3535
|
create(base) {
|
|
@@ -3457,11 +3579,17 @@ var Tx = {
|
|
|
3457
3579
|
setKeykeeper: SetKeykeeperTx.fromPartial(object.payload.setKeykeeper)
|
|
3458
3580
|
};
|
|
3459
3581
|
}
|
|
3582
|
+
if (object.payload?.$case === "setSik" && object.payload?.setSik !== void 0 && object.payload?.setSik !== null) {
|
|
3583
|
+
message.payload = { $case: "setSik", setSik: SikTx.fromPartial(object.payload.setSik) };
|
|
3584
|
+
}
|
|
3585
|
+
if (object.payload?.$case === "delSik" && object.payload?.delSik !== void 0 && object.payload?.delSik !== null) {
|
|
3586
|
+
message.payload = { $case: "delSik", delSik: SikTx.fromPartial(object.payload.delSik) };
|
|
3587
|
+
}
|
|
3460
3588
|
return message;
|
|
3461
3589
|
}
|
|
3462
3590
|
};
|
|
3463
3591
|
function createBaseSignedTx() {
|
|
3464
|
-
return { tx: new Uint8Array(), signature: void 0 };
|
|
3592
|
+
return { tx: new Uint8Array(0), signature: void 0 };
|
|
3465
3593
|
}
|
|
3466
3594
|
var SignedTx = {
|
|
3467
3595
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3481,19 +3609,19 @@ var SignedTx = {
|
|
|
3481
3609
|
const tag = reader.uint32();
|
|
3482
3610
|
switch (tag >>> 3) {
|
|
3483
3611
|
case 1:
|
|
3484
|
-
if (tag
|
|
3612
|
+
if (tag !== 10) {
|
|
3485
3613
|
break;
|
|
3486
3614
|
}
|
|
3487
3615
|
message.tx = reader.bytes();
|
|
3488
3616
|
continue;
|
|
3489
3617
|
case 2:
|
|
3490
|
-
if (tag
|
|
3618
|
+
if (tag !== 18) {
|
|
3491
3619
|
break;
|
|
3492
3620
|
}
|
|
3493
3621
|
message.signature = reader.bytes();
|
|
3494
3622
|
continue;
|
|
3495
3623
|
}
|
|
3496
|
-
if ((tag & 7)
|
|
3624
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3497
3625
|
break;
|
|
3498
3626
|
}
|
|
3499
3627
|
reader.skipType(tag & 7);
|
|
@@ -3502,14 +3630,18 @@ var SignedTx = {
|
|
|
3502
3630
|
},
|
|
3503
3631
|
fromJSON(object) {
|
|
3504
3632
|
return {
|
|
3505
|
-
tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
|
|
3633
|
+
tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(0),
|
|
3506
3634
|
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : void 0
|
|
3507
3635
|
};
|
|
3508
3636
|
},
|
|
3509
3637
|
toJSON(message) {
|
|
3510
3638
|
const obj = {};
|
|
3511
|
-
|
|
3512
|
-
|
|
3639
|
+
if (message.tx.length !== 0) {
|
|
3640
|
+
obj.tx = base64FromBytes(message.tx);
|
|
3641
|
+
}
|
|
3642
|
+
if (message.signature !== void 0) {
|
|
3643
|
+
obj.signature = base64FromBytes(message.signature);
|
|
3644
|
+
}
|
|
3513
3645
|
return obj;
|
|
3514
3646
|
},
|
|
3515
3647
|
create(base) {
|
|
@@ -3517,7 +3649,7 @@ var SignedTx = {
|
|
|
3517
3649
|
},
|
|
3518
3650
|
fromPartial(object) {
|
|
3519
3651
|
const message = createBaseSignedTx();
|
|
3520
|
-
message.tx = object.tx ?? new Uint8Array();
|
|
3652
|
+
message.tx = object.tx ?? new Uint8Array(0);
|
|
3521
3653
|
message.signature = object.signature ?? void 0;
|
|
3522
3654
|
return message;
|
|
3523
3655
|
}
|
|
@@ -3546,25 +3678,25 @@ var NewProcessTx = {
|
|
|
3546
3678
|
const tag = reader.uint32();
|
|
3547
3679
|
switch (tag >>> 3) {
|
|
3548
3680
|
case 1:
|
|
3549
|
-
if (tag
|
|
3681
|
+
if (tag !== 8) {
|
|
3550
3682
|
break;
|
|
3551
3683
|
}
|
|
3552
3684
|
message.txtype = reader.int32();
|
|
3553
3685
|
continue;
|
|
3554
3686
|
case 2:
|
|
3555
|
-
if (tag
|
|
3687
|
+
if (tag !== 16) {
|
|
3556
3688
|
break;
|
|
3557
3689
|
}
|
|
3558
3690
|
message.nonce = reader.uint32();
|
|
3559
3691
|
continue;
|
|
3560
3692
|
case 3:
|
|
3561
|
-
if (tag
|
|
3693
|
+
if (tag !== 26) {
|
|
3562
3694
|
break;
|
|
3563
3695
|
}
|
|
3564
3696
|
message.process = Process.decode(reader, reader.uint32());
|
|
3565
3697
|
continue;
|
|
3566
3698
|
}
|
|
3567
|
-
if ((tag & 7)
|
|
3699
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3568
3700
|
break;
|
|
3569
3701
|
}
|
|
3570
3702
|
reader.skipType(tag & 7);
|
|
@@ -3580,9 +3712,15 @@ var NewProcessTx = {
|
|
|
3580
3712
|
},
|
|
3581
3713
|
toJSON(message) {
|
|
3582
3714
|
const obj = {};
|
|
3583
|
-
message.txtype !==
|
|
3584
|
-
|
|
3585
|
-
|
|
3715
|
+
if (message.txtype !== 0) {
|
|
3716
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
3717
|
+
}
|
|
3718
|
+
if (message.nonce !== 0) {
|
|
3719
|
+
obj.nonce = Math.round(message.nonce);
|
|
3720
|
+
}
|
|
3721
|
+
if (message.process !== void 0) {
|
|
3722
|
+
obj.process = Process.toJSON(message.process);
|
|
3723
|
+
}
|
|
3586
3724
|
return obj;
|
|
3587
3725
|
},
|
|
3588
3726
|
create(base) {
|
|
@@ -3600,7 +3738,7 @@ function createBaseSetProcessTx() {
|
|
|
3600
3738
|
return {
|
|
3601
3739
|
txtype: 0,
|
|
3602
3740
|
nonce: 0,
|
|
3603
|
-
processId: new Uint8Array(),
|
|
3741
|
+
processId: new Uint8Array(0),
|
|
3604
3742
|
status: void 0,
|
|
3605
3743
|
questionIndex: void 0,
|
|
3606
3744
|
censusRoot: void 0,
|
|
@@ -3648,61 +3786,61 @@ var SetProcessTx = {
|
|
|
3648
3786
|
const tag = reader.uint32();
|
|
3649
3787
|
switch (tag >>> 3) {
|
|
3650
3788
|
case 1:
|
|
3651
|
-
if (tag
|
|
3789
|
+
if (tag !== 8) {
|
|
3652
3790
|
break;
|
|
3653
3791
|
}
|
|
3654
3792
|
message.txtype = reader.int32();
|
|
3655
3793
|
continue;
|
|
3656
3794
|
case 2:
|
|
3657
|
-
if (tag
|
|
3795
|
+
if (tag !== 16) {
|
|
3658
3796
|
break;
|
|
3659
3797
|
}
|
|
3660
3798
|
message.nonce = reader.uint32();
|
|
3661
3799
|
continue;
|
|
3662
3800
|
case 3:
|
|
3663
|
-
if (tag
|
|
3801
|
+
if (tag !== 26) {
|
|
3664
3802
|
break;
|
|
3665
3803
|
}
|
|
3666
3804
|
message.processId = reader.bytes();
|
|
3667
3805
|
continue;
|
|
3668
3806
|
case 4:
|
|
3669
|
-
if (tag
|
|
3807
|
+
if (tag !== 32) {
|
|
3670
3808
|
break;
|
|
3671
3809
|
}
|
|
3672
3810
|
message.status = reader.int32();
|
|
3673
3811
|
continue;
|
|
3674
3812
|
case 5:
|
|
3675
|
-
if (tag
|
|
3813
|
+
if (tag !== 40) {
|
|
3676
3814
|
break;
|
|
3677
3815
|
}
|
|
3678
3816
|
message.questionIndex = reader.uint32();
|
|
3679
3817
|
continue;
|
|
3680
3818
|
case 6:
|
|
3681
|
-
if (tag
|
|
3819
|
+
if (tag !== 50) {
|
|
3682
3820
|
break;
|
|
3683
3821
|
}
|
|
3684
3822
|
message.censusRoot = reader.bytes();
|
|
3685
3823
|
continue;
|
|
3686
3824
|
case 7:
|
|
3687
|
-
if (tag
|
|
3825
|
+
if (tag !== 58) {
|
|
3688
3826
|
break;
|
|
3689
3827
|
}
|
|
3690
3828
|
message.censusURI = reader.string();
|
|
3691
3829
|
continue;
|
|
3692
3830
|
case 8:
|
|
3693
|
-
if (tag
|
|
3831
|
+
if (tag !== 66) {
|
|
3694
3832
|
break;
|
|
3695
3833
|
}
|
|
3696
3834
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
3697
3835
|
continue;
|
|
3698
3836
|
case 9:
|
|
3699
|
-
if (tag
|
|
3837
|
+
if (tag !== 74) {
|
|
3700
3838
|
break;
|
|
3701
3839
|
}
|
|
3702
3840
|
message.results = ProcessResult.decode(reader, reader.uint32());
|
|
3703
3841
|
continue;
|
|
3704
3842
|
}
|
|
3705
|
-
if ((tag & 7)
|
|
3843
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3706
3844
|
break;
|
|
3707
3845
|
}
|
|
3708
3846
|
reader.skipType(tag & 7);
|
|
@@ -3713,7 +3851,7 @@ var SetProcessTx = {
|
|
|
3713
3851
|
return {
|
|
3714
3852
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3715
3853
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3716
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
3854
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3717
3855
|
status: isSet(object.status) ? processStatusFromJSON(object.status) : void 0,
|
|
3718
3856
|
questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
|
|
3719
3857
|
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : void 0,
|
|
@@ -3724,15 +3862,33 @@ var SetProcessTx = {
|
|
|
3724
3862
|
},
|
|
3725
3863
|
toJSON(message) {
|
|
3726
3864
|
const obj = {};
|
|
3727
|
-
message.txtype !==
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
message.
|
|
3734
|
-
|
|
3735
|
-
|
|
3865
|
+
if (message.txtype !== 0) {
|
|
3866
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
3867
|
+
}
|
|
3868
|
+
if (message.nonce !== 0) {
|
|
3869
|
+
obj.nonce = Math.round(message.nonce);
|
|
3870
|
+
}
|
|
3871
|
+
if (message.processId.length !== 0) {
|
|
3872
|
+
obj.processId = base64FromBytes(message.processId);
|
|
3873
|
+
}
|
|
3874
|
+
if (message.status !== void 0) {
|
|
3875
|
+
obj.status = processStatusToJSON(message.status);
|
|
3876
|
+
}
|
|
3877
|
+
if (message.questionIndex !== void 0) {
|
|
3878
|
+
obj.questionIndex = Math.round(message.questionIndex);
|
|
3879
|
+
}
|
|
3880
|
+
if (message.censusRoot !== void 0) {
|
|
3881
|
+
obj.censusRoot = base64FromBytes(message.censusRoot);
|
|
3882
|
+
}
|
|
3883
|
+
if (message.censusURI !== void 0) {
|
|
3884
|
+
obj.censusURI = message.censusURI;
|
|
3885
|
+
}
|
|
3886
|
+
if (message.proof !== void 0) {
|
|
3887
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
3888
|
+
}
|
|
3889
|
+
if (message.results !== void 0) {
|
|
3890
|
+
obj.results = ProcessResult.toJSON(message.results);
|
|
3891
|
+
}
|
|
3736
3892
|
return obj;
|
|
3737
3893
|
},
|
|
3738
3894
|
create(base) {
|
|
@@ -3742,7 +3898,7 @@ var SetProcessTx = {
|
|
|
3742
3898
|
const message = createBaseSetProcessTx();
|
|
3743
3899
|
message.txtype = object.txtype ?? 0;
|
|
3744
3900
|
message.nonce = object.nonce ?? 0;
|
|
3745
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
3901
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
3746
3902
|
message.status = object.status ?? void 0;
|
|
3747
3903
|
message.questionIndex = object.questionIndex ?? void 0;
|
|
3748
3904
|
message.censusRoot = object.censusRoot ?? void 0;
|
|
@@ -3755,7 +3911,7 @@ var SetProcessTx = {
|
|
|
3755
3911
|
function createBaseAdminTx() {
|
|
3756
3912
|
return {
|
|
3757
3913
|
txtype: 0,
|
|
3758
|
-
processId: new Uint8Array(),
|
|
3914
|
+
processId: new Uint8Array(0),
|
|
3759
3915
|
address: void 0,
|
|
3760
3916
|
encryptionPrivateKey: void 0,
|
|
3761
3917
|
encryptionPublicKey: void 0,
|
|
@@ -3804,61 +3960,61 @@ var AdminTx = {
|
|
|
3804
3960
|
const tag = reader.uint32();
|
|
3805
3961
|
switch (tag >>> 3) {
|
|
3806
3962
|
case 1:
|
|
3807
|
-
if (tag
|
|
3963
|
+
if (tag !== 8) {
|
|
3808
3964
|
break;
|
|
3809
3965
|
}
|
|
3810
3966
|
message.txtype = reader.int32();
|
|
3811
3967
|
continue;
|
|
3812
3968
|
case 2:
|
|
3813
|
-
if (tag
|
|
3969
|
+
if (tag !== 18) {
|
|
3814
3970
|
break;
|
|
3815
3971
|
}
|
|
3816
3972
|
message.processId = reader.bytes();
|
|
3817
3973
|
continue;
|
|
3818
3974
|
case 3:
|
|
3819
|
-
if (tag
|
|
3975
|
+
if (tag !== 26) {
|
|
3820
3976
|
break;
|
|
3821
3977
|
}
|
|
3822
3978
|
message.address = reader.bytes();
|
|
3823
3979
|
continue;
|
|
3824
3980
|
case 5:
|
|
3825
|
-
if (tag
|
|
3981
|
+
if (tag !== 42) {
|
|
3826
3982
|
break;
|
|
3827
3983
|
}
|
|
3828
3984
|
message.encryptionPrivateKey = reader.bytes();
|
|
3829
3985
|
continue;
|
|
3830
3986
|
case 6:
|
|
3831
|
-
if (tag
|
|
3987
|
+
if (tag !== 50) {
|
|
3832
3988
|
break;
|
|
3833
3989
|
}
|
|
3834
3990
|
message.encryptionPublicKey = reader.bytes();
|
|
3835
3991
|
continue;
|
|
3836
3992
|
case 7:
|
|
3837
|
-
if (tag
|
|
3993
|
+
if (tag !== 56) {
|
|
3838
3994
|
break;
|
|
3839
3995
|
}
|
|
3840
3996
|
message.keyIndex = reader.uint32();
|
|
3841
3997
|
continue;
|
|
3842
3998
|
case 8:
|
|
3843
|
-
if (tag
|
|
3999
|
+
if (tag !== 64) {
|
|
3844
4000
|
break;
|
|
3845
4001
|
}
|
|
3846
4002
|
message.power = longToNumber(reader.uint64());
|
|
3847
4003
|
continue;
|
|
3848
4004
|
case 9:
|
|
3849
|
-
if (tag
|
|
4005
|
+
if (tag !== 74) {
|
|
3850
4006
|
break;
|
|
3851
4007
|
}
|
|
3852
4008
|
message.publicKey = reader.bytes();
|
|
3853
4009
|
continue;
|
|
3854
4010
|
case 11:
|
|
3855
|
-
if (tag
|
|
4011
|
+
if (tag !== 88) {
|
|
3856
4012
|
break;
|
|
3857
4013
|
}
|
|
3858
4014
|
message.nonce = reader.uint32();
|
|
3859
4015
|
continue;
|
|
3860
4016
|
}
|
|
3861
|
-
if ((tag & 7)
|
|
4017
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3862
4018
|
break;
|
|
3863
4019
|
}
|
|
3864
4020
|
reader.skipType(tag & 7);
|
|
@@ -3868,7 +4024,7 @@ var AdminTx = {
|
|
|
3868
4024
|
fromJSON(object) {
|
|
3869
4025
|
return {
|
|
3870
4026
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3871
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
4027
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3872
4028
|
address: isSet(object.address) ? bytesFromBase64(object.address) : void 0,
|
|
3873
4029
|
encryptionPrivateKey: isSet(object.encryptionPrivateKey) ? bytesFromBase64(object.encryptionPrivateKey) : void 0,
|
|
3874
4030
|
encryptionPublicKey: isSet(object.encryptionPublicKey) ? bytesFromBase64(object.encryptionPublicKey) : void 0,
|
|
@@ -3880,15 +4036,33 @@ var AdminTx = {
|
|
|
3880
4036
|
},
|
|
3881
4037
|
toJSON(message) {
|
|
3882
4038
|
const obj = {};
|
|
3883
|
-
message.txtype !==
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
message.
|
|
3890
|
-
|
|
3891
|
-
|
|
4039
|
+
if (message.txtype !== 0) {
|
|
4040
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4041
|
+
}
|
|
4042
|
+
if (message.processId.length !== 0) {
|
|
4043
|
+
obj.processId = base64FromBytes(message.processId);
|
|
4044
|
+
}
|
|
4045
|
+
if (message.address !== void 0) {
|
|
4046
|
+
obj.address = base64FromBytes(message.address);
|
|
4047
|
+
}
|
|
4048
|
+
if (message.encryptionPrivateKey !== void 0) {
|
|
4049
|
+
obj.encryptionPrivateKey = base64FromBytes(message.encryptionPrivateKey);
|
|
4050
|
+
}
|
|
4051
|
+
if (message.encryptionPublicKey !== void 0) {
|
|
4052
|
+
obj.encryptionPublicKey = base64FromBytes(message.encryptionPublicKey);
|
|
4053
|
+
}
|
|
4054
|
+
if (message.keyIndex !== void 0) {
|
|
4055
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
4056
|
+
}
|
|
4057
|
+
if (message.power !== void 0) {
|
|
4058
|
+
obj.power = Math.round(message.power);
|
|
4059
|
+
}
|
|
4060
|
+
if (message.publicKey !== void 0) {
|
|
4061
|
+
obj.publicKey = base64FromBytes(message.publicKey);
|
|
4062
|
+
}
|
|
4063
|
+
if (message.nonce !== 0) {
|
|
4064
|
+
obj.nonce = Math.round(message.nonce);
|
|
4065
|
+
}
|
|
3892
4066
|
return obj;
|
|
3893
4067
|
},
|
|
3894
4068
|
create(base) {
|
|
@@ -3897,7 +4071,7 @@ var AdminTx = {
|
|
|
3897
4071
|
fromPartial(object) {
|
|
3898
4072
|
const message = createBaseAdminTx();
|
|
3899
4073
|
message.txtype = object.txtype ?? 0;
|
|
3900
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
4074
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
3901
4075
|
message.address = object.address ?? void 0;
|
|
3902
4076
|
message.encryptionPrivateKey = object.encryptionPrivateKey ?? void 0;
|
|
3903
4077
|
message.encryptionPublicKey = object.encryptionPublicKey ?? void 0;
|
|
@@ -3909,7 +4083,7 @@ var AdminTx = {
|
|
|
3909
4083
|
}
|
|
3910
4084
|
};
|
|
3911
4085
|
function createBaseRegisterKeyTx() {
|
|
3912
|
-
return { nonce: 0, processId: new Uint8Array(), proof: void 0, newKey: new Uint8Array(), weight: "" };
|
|
4086
|
+
return { nonce: 0, processId: new Uint8Array(0), proof: void 0, newKey: new Uint8Array(0), weight: "" };
|
|
3913
4087
|
}
|
|
3914
4088
|
var RegisterKeyTx = {
|
|
3915
4089
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3938,37 +4112,37 @@ var RegisterKeyTx = {
|
|
|
3938
4112
|
const tag = reader.uint32();
|
|
3939
4113
|
switch (tag >>> 3) {
|
|
3940
4114
|
case 1:
|
|
3941
|
-
if (tag
|
|
4115
|
+
if (tag !== 8) {
|
|
3942
4116
|
break;
|
|
3943
4117
|
}
|
|
3944
4118
|
message.nonce = reader.uint32();
|
|
3945
4119
|
continue;
|
|
3946
4120
|
case 2:
|
|
3947
|
-
if (tag
|
|
4121
|
+
if (tag !== 18) {
|
|
3948
4122
|
break;
|
|
3949
4123
|
}
|
|
3950
4124
|
message.processId = reader.bytes();
|
|
3951
4125
|
continue;
|
|
3952
4126
|
case 3:
|
|
3953
|
-
if (tag
|
|
4127
|
+
if (tag !== 26) {
|
|
3954
4128
|
break;
|
|
3955
4129
|
}
|
|
3956
4130
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
3957
4131
|
continue;
|
|
3958
4132
|
case 4:
|
|
3959
|
-
if (tag
|
|
4133
|
+
if (tag !== 34) {
|
|
3960
4134
|
break;
|
|
3961
4135
|
}
|
|
3962
4136
|
message.newKey = reader.bytes();
|
|
3963
4137
|
continue;
|
|
3964
4138
|
case 5:
|
|
3965
|
-
if (tag
|
|
4139
|
+
if (tag !== 42) {
|
|
3966
4140
|
break;
|
|
3967
4141
|
}
|
|
3968
4142
|
message.weight = reader.string();
|
|
3969
4143
|
continue;
|
|
3970
4144
|
}
|
|
3971
|
-
if ((tag & 7)
|
|
4145
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3972
4146
|
break;
|
|
3973
4147
|
}
|
|
3974
4148
|
reader.skipType(tag & 7);
|
|
@@ -3978,19 +4152,29 @@ var RegisterKeyTx = {
|
|
|
3978
4152
|
fromJSON(object) {
|
|
3979
4153
|
return {
|
|
3980
4154
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3981
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
4155
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3982
4156
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
3983
|
-
newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(),
|
|
4157
|
+
newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(0),
|
|
3984
4158
|
weight: isSet(object.weight) ? String(object.weight) : ""
|
|
3985
4159
|
};
|
|
3986
4160
|
},
|
|
3987
4161
|
toJSON(message) {
|
|
3988
4162
|
const obj = {};
|
|
3989
|
-
message.nonce !==
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
4163
|
+
if (message.nonce !== 0) {
|
|
4164
|
+
obj.nonce = Math.round(message.nonce);
|
|
4165
|
+
}
|
|
4166
|
+
if (message.processId.length !== 0) {
|
|
4167
|
+
obj.processId = base64FromBytes(message.processId);
|
|
4168
|
+
}
|
|
4169
|
+
if (message.proof !== void 0) {
|
|
4170
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
4171
|
+
}
|
|
4172
|
+
if (message.newKey.length !== 0) {
|
|
4173
|
+
obj.newKey = base64FromBytes(message.newKey);
|
|
4174
|
+
}
|
|
4175
|
+
if (message.weight !== "") {
|
|
4176
|
+
obj.weight = message.weight;
|
|
4177
|
+
}
|
|
3994
4178
|
return obj;
|
|
3995
4179
|
},
|
|
3996
4180
|
create(base) {
|
|
@@ -3999,15 +4183,15 @@ var RegisterKeyTx = {
|
|
|
3999
4183
|
fromPartial(object) {
|
|
4000
4184
|
const message = createBaseRegisterKeyTx();
|
|
4001
4185
|
message.nonce = object.nonce ?? 0;
|
|
4002
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
4186
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
4003
4187
|
message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
|
|
4004
|
-
message.newKey = object.newKey ?? new Uint8Array();
|
|
4188
|
+
message.newKey = object.newKey ?? new Uint8Array(0);
|
|
4005
4189
|
message.weight = object.weight ?? "";
|
|
4006
4190
|
return message;
|
|
4007
4191
|
}
|
|
4008
4192
|
};
|
|
4009
4193
|
function createBaseMintTokensTx() {
|
|
4010
|
-
return { txtype: 0, nonce: 0, to: new Uint8Array(), value: 0 };
|
|
4194
|
+
return { txtype: 0, nonce: 0, to: new Uint8Array(0), value: 0 };
|
|
4011
4195
|
}
|
|
4012
4196
|
var MintTokensTx = {
|
|
4013
4197
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4033,31 +4217,31 @@ var MintTokensTx = {
|
|
|
4033
4217
|
const tag = reader.uint32();
|
|
4034
4218
|
switch (tag >>> 3) {
|
|
4035
4219
|
case 1:
|
|
4036
|
-
if (tag
|
|
4220
|
+
if (tag !== 8) {
|
|
4037
4221
|
break;
|
|
4038
4222
|
}
|
|
4039
4223
|
message.txtype = reader.int32();
|
|
4040
4224
|
continue;
|
|
4041
4225
|
case 2:
|
|
4042
|
-
if (tag
|
|
4226
|
+
if (tag !== 16) {
|
|
4043
4227
|
break;
|
|
4044
4228
|
}
|
|
4045
4229
|
message.nonce = reader.uint32();
|
|
4046
4230
|
continue;
|
|
4047
4231
|
case 3:
|
|
4048
|
-
if (tag
|
|
4232
|
+
if (tag !== 26) {
|
|
4049
4233
|
break;
|
|
4050
4234
|
}
|
|
4051
4235
|
message.to = reader.bytes();
|
|
4052
4236
|
continue;
|
|
4053
4237
|
case 4:
|
|
4054
|
-
if (tag
|
|
4238
|
+
if (tag !== 32) {
|
|
4055
4239
|
break;
|
|
4056
4240
|
}
|
|
4057
4241
|
message.value = longToNumber(reader.uint64());
|
|
4058
4242
|
continue;
|
|
4059
4243
|
}
|
|
4060
|
-
if ((tag & 7)
|
|
4244
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4061
4245
|
break;
|
|
4062
4246
|
}
|
|
4063
4247
|
reader.skipType(tag & 7);
|
|
@@ -4068,16 +4252,24 @@ var MintTokensTx = {
|
|
|
4068
4252
|
return {
|
|
4069
4253
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4070
4254
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4071
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4255
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4072
4256
|
value: isSet(object.value) ? Number(object.value) : 0
|
|
4073
4257
|
};
|
|
4074
4258
|
},
|
|
4075
4259
|
toJSON(message) {
|
|
4076
4260
|
const obj = {};
|
|
4077
|
-
message.txtype !==
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
message.
|
|
4261
|
+
if (message.txtype !== 0) {
|
|
4262
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4263
|
+
}
|
|
4264
|
+
if (message.nonce !== 0) {
|
|
4265
|
+
obj.nonce = Math.round(message.nonce);
|
|
4266
|
+
}
|
|
4267
|
+
if (message.to.length !== 0) {
|
|
4268
|
+
obj.to = base64FromBytes(message.to);
|
|
4269
|
+
}
|
|
4270
|
+
if (message.value !== 0) {
|
|
4271
|
+
obj.value = Math.round(message.value);
|
|
4272
|
+
}
|
|
4081
4273
|
return obj;
|
|
4082
4274
|
},
|
|
4083
4275
|
create(base) {
|
|
@@ -4087,13 +4279,13 @@ var MintTokensTx = {
|
|
|
4087
4279
|
const message = createBaseMintTokensTx();
|
|
4088
4280
|
message.txtype = object.txtype ?? 0;
|
|
4089
4281
|
message.nonce = object.nonce ?? 0;
|
|
4090
|
-
message.to = object.to ?? new Uint8Array();
|
|
4282
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4091
4283
|
message.value = object.value ?? 0;
|
|
4092
4284
|
return message;
|
|
4093
4285
|
}
|
|
4094
4286
|
};
|
|
4095
4287
|
function createBaseSendTokensTx() {
|
|
4096
|
-
return { txtype: 0, nonce: 0, from: new Uint8Array(), to: new Uint8Array(), value: 0 };
|
|
4288
|
+
return { txtype: 0, nonce: 0, from: new Uint8Array(0), to: new Uint8Array(0), value: 0 };
|
|
4097
4289
|
}
|
|
4098
4290
|
var SendTokensTx = {
|
|
4099
4291
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4122,37 +4314,37 @@ var SendTokensTx = {
|
|
|
4122
4314
|
const tag = reader.uint32();
|
|
4123
4315
|
switch (tag >>> 3) {
|
|
4124
4316
|
case 1:
|
|
4125
|
-
if (tag
|
|
4317
|
+
if (tag !== 8) {
|
|
4126
4318
|
break;
|
|
4127
4319
|
}
|
|
4128
4320
|
message.txtype = reader.int32();
|
|
4129
4321
|
continue;
|
|
4130
4322
|
case 2:
|
|
4131
|
-
if (tag
|
|
4323
|
+
if (tag !== 16) {
|
|
4132
4324
|
break;
|
|
4133
4325
|
}
|
|
4134
4326
|
message.nonce = reader.uint32();
|
|
4135
4327
|
continue;
|
|
4136
4328
|
case 3:
|
|
4137
|
-
if (tag
|
|
4329
|
+
if (tag !== 26) {
|
|
4138
4330
|
break;
|
|
4139
4331
|
}
|
|
4140
4332
|
message.from = reader.bytes();
|
|
4141
4333
|
continue;
|
|
4142
4334
|
case 4:
|
|
4143
|
-
if (tag
|
|
4335
|
+
if (tag !== 34) {
|
|
4144
4336
|
break;
|
|
4145
4337
|
}
|
|
4146
4338
|
message.to = reader.bytes();
|
|
4147
4339
|
continue;
|
|
4148
4340
|
case 5:
|
|
4149
|
-
if (tag
|
|
4341
|
+
if (tag !== 40) {
|
|
4150
4342
|
break;
|
|
4151
4343
|
}
|
|
4152
4344
|
message.value = longToNumber(reader.uint64());
|
|
4153
4345
|
continue;
|
|
4154
4346
|
}
|
|
4155
|
-
if ((tag & 7)
|
|
4347
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4156
4348
|
break;
|
|
4157
4349
|
}
|
|
4158
4350
|
reader.skipType(tag & 7);
|
|
@@ -4163,18 +4355,28 @@ var SendTokensTx = {
|
|
|
4163
4355
|
return {
|
|
4164
4356
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4165
4357
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4166
|
-
from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(),
|
|
4167
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4358
|
+
from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(0),
|
|
4359
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4168
4360
|
value: isSet(object.value) ? Number(object.value) : 0
|
|
4169
4361
|
};
|
|
4170
4362
|
},
|
|
4171
4363
|
toJSON(message) {
|
|
4172
4364
|
const obj = {};
|
|
4173
|
-
message.txtype !==
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4365
|
+
if (message.txtype !== 0) {
|
|
4366
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4367
|
+
}
|
|
4368
|
+
if (message.nonce !== 0) {
|
|
4369
|
+
obj.nonce = Math.round(message.nonce);
|
|
4370
|
+
}
|
|
4371
|
+
if (message.from.length !== 0) {
|
|
4372
|
+
obj.from = base64FromBytes(message.from);
|
|
4373
|
+
}
|
|
4374
|
+
if (message.to.length !== 0) {
|
|
4375
|
+
obj.to = base64FromBytes(message.to);
|
|
4376
|
+
}
|
|
4377
|
+
if (message.value !== 0) {
|
|
4378
|
+
obj.value = Math.round(message.value);
|
|
4379
|
+
}
|
|
4178
4380
|
return obj;
|
|
4179
4381
|
},
|
|
4180
4382
|
create(base) {
|
|
@@ -4184,8 +4386,8 @@ var SendTokensTx = {
|
|
|
4184
4386
|
const message = createBaseSendTokensTx();
|
|
4185
4387
|
message.txtype = object.txtype ?? 0;
|
|
4186
4388
|
message.nonce = object.nonce ?? 0;
|
|
4187
|
-
message.from = object.from ?? new Uint8Array();
|
|
4188
|
-
message.to = object.to ?? new Uint8Array();
|
|
4389
|
+
message.from = object.from ?? new Uint8Array(0);
|
|
4390
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4189
4391
|
message.value = object.value ?? 0;
|
|
4190
4392
|
return message;
|
|
4191
4393
|
}
|
|
@@ -4214,25 +4416,25 @@ var SetTransactionCostsTx = {
|
|
|
4214
4416
|
const tag = reader.uint32();
|
|
4215
4417
|
switch (tag >>> 3) {
|
|
4216
4418
|
case 1:
|
|
4217
|
-
if (tag
|
|
4419
|
+
if (tag !== 8) {
|
|
4218
4420
|
break;
|
|
4219
4421
|
}
|
|
4220
4422
|
message.txtype = reader.int32();
|
|
4221
4423
|
continue;
|
|
4222
4424
|
case 2:
|
|
4223
|
-
if (tag
|
|
4425
|
+
if (tag !== 16) {
|
|
4224
4426
|
break;
|
|
4225
4427
|
}
|
|
4226
4428
|
message.nonce = reader.uint32();
|
|
4227
4429
|
continue;
|
|
4228
4430
|
case 3:
|
|
4229
|
-
if (tag
|
|
4431
|
+
if (tag !== 24) {
|
|
4230
4432
|
break;
|
|
4231
4433
|
}
|
|
4232
4434
|
message.value = longToNumber(reader.uint64());
|
|
4233
4435
|
continue;
|
|
4234
4436
|
}
|
|
4235
|
-
if ((tag & 7)
|
|
4437
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4236
4438
|
break;
|
|
4237
4439
|
}
|
|
4238
4440
|
reader.skipType(tag & 7);
|
|
@@ -4248,9 +4450,15 @@ var SetTransactionCostsTx = {
|
|
|
4248
4450
|
},
|
|
4249
4451
|
toJSON(message) {
|
|
4250
4452
|
const obj = {};
|
|
4251
|
-
message.txtype !==
|
|
4252
|
-
|
|
4253
|
-
|
|
4453
|
+
if (message.txtype !== 0) {
|
|
4454
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4455
|
+
}
|
|
4456
|
+
if (message.nonce !== 0) {
|
|
4457
|
+
obj.nonce = Math.round(message.nonce);
|
|
4458
|
+
}
|
|
4459
|
+
if (message.value !== 0) {
|
|
4460
|
+
obj.value = Math.round(message.value);
|
|
4461
|
+
}
|
|
4254
4462
|
return obj;
|
|
4255
4463
|
},
|
|
4256
4464
|
create(base) {
|
|
@@ -4271,7 +4479,8 @@ function createBaseSetAccountTx() {
|
|
|
4271
4479
|
infoURI: void 0,
|
|
4272
4480
|
account: void 0,
|
|
4273
4481
|
faucetPackage: void 0,
|
|
4274
|
-
delegates: []
|
|
4482
|
+
delegates: [],
|
|
4483
|
+
sik: void 0
|
|
4275
4484
|
};
|
|
4276
4485
|
}
|
|
4277
4486
|
var SetAccountTx = {
|
|
@@ -4294,6 +4503,9 @@ var SetAccountTx = {
|
|
|
4294
4503
|
for (const v of message.delegates) {
|
|
4295
4504
|
writer.uint32(50).bytes(v);
|
|
4296
4505
|
}
|
|
4506
|
+
if (message.sik !== void 0) {
|
|
4507
|
+
writer.uint32(58).bytes(message.sik);
|
|
4508
|
+
}
|
|
4297
4509
|
return writer;
|
|
4298
4510
|
},
|
|
4299
4511
|
decode(input, length) {
|
|
@@ -4304,43 +4516,49 @@ var SetAccountTx = {
|
|
|
4304
4516
|
const tag = reader.uint32();
|
|
4305
4517
|
switch (tag >>> 3) {
|
|
4306
4518
|
case 1:
|
|
4307
|
-
if (tag
|
|
4519
|
+
if (tag !== 8) {
|
|
4308
4520
|
break;
|
|
4309
4521
|
}
|
|
4310
4522
|
message.txtype = reader.int32();
|
|
4311
4523
|
continue;
|
|
4312
4524
|
case 2:
|
|
4313
|
-
if (tag
|
|
4525
|
+
if (tag !== 16) {
|
|
4314
4526
|
break;
|
|
4315
4527
|
}
|
|
4316
4528
|
message.nonce = reader.uint32();
|
|
4317
4529
|
continue;
|
|
4318
4530
|
case 3:
|
|
4319
|
-
if (tag
|
|
4531
|
+
if (tag !== 26) {
|
|
4320
4532
|
break;
|
|
4321
4533
|
}
|
|
4322
4534
|
message.infoURI = reader.string();
|
|
4323
4535
|
continue;
|
|
4324
4536
|
case 4:
|
|
4325
|
-
if (tag
|
|
4537
|
+
if (tag !== 34) {
|
|
4326
4538
|
break;
|
|
4327
4539
|
}
|
|
4328
4540
|
message.account = reader.bytes();
|
|
4329
4541
|
continue;
|
|
4330
4542
|
case 5:
|
|
4331
|
-
if (tag
|
|
4543
|
+
if (tag !== 42) {
|
|
4332
4544
|
break;
|
|
4333
4545
|
}
|
|
4334
4546
|
message.faucetPackage = FaucetPackage.decode(reader, reader.uint32());
|
|
4335
4547
|
continue;
|
|
4336
4548
|
case 6:
|
|
4337
|
-
if (tag
|
|
4549
|
+
if (tag !== 50) {
|
|
4338
4550
|
break;
|
|
4339
4551
|
}
|
|
4340
4552
|
message.delegates.push(reader.bytes());
|
|
4341
4553
|
continue;
|
|
4554
|
+
case 7:
|
|
4555
|
+
if (tag !== 58) {
|
|
4556
|
+
break;
|
|
4557
|
+
}
|
|
4558
|
+
message.sik = reader.bytes();
|
|
4559
|
+
continue;
|
|
4342
4560
|
}
|
|
4343
|
-
if ((tag & 7)
|
|
4561
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4344
4562
|
break;
|
|
4345
4563
|
}
|
|
4346
4564
|
reader.skipType(tag & 7);
|
|
@@ -4354,20 +4572,32 @@ var SetAccountTx = {
|
|
|
4354
4572
|
infoURI: isSet(object.infoURI) ? String(object.infoURI) : void 0,
|
|
4355
4573
|
account: isSet(object.account) ? bytesFromBase64(object.account) : void 0,
|
|
4356
4574
|
faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
|
|
4357
|
-
delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : []
|
|
4575
|
+
delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
|
|
4576
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : void 0
|
|
4358
4577
|
};
|
|
4359
4578
|
},
|
|
4360
4579
|
toJSON(message) {
|
|
4361
4580
|
const obj = {};
|
|
4362
|
-
message.txtype !==
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4581
|
+
if (message.txtype !== 0) {
|
|
4582
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4583
|
+
}
|
|
4584
|
+
if (message.nonce !== void 0) {
|
|
4585
|
+
obj.nonce = Math.round(message.nonce);
|
|
4586
|
+
}
|
|
4587
|
+
if (message.infoURI !== void 0) {
|
|
4588
|
+
obj.infoURI = message.infoURI;
|
|
4589
|
+
}
|
|
4590
|
+
if (message.account !== void 0) {
|
|
4591
|
+
obj.account = base64FromBytes(message.account);
|
|
4592
|
+
}
|
|
4593
|
+
if (message.faucetPackage !== void 0) {
|
|
4594
|
+
obj.faucetPackage = FaucetPackage.toJSON(message.faucetPackage);
|
|
4595
|
+
}
|
|
4596
|
+
if (message.delegates?.length) {
|
|
4597
|
+
obj.delegates = message.delegates.map((e) => base64FromBytes(e));
|
|
4598
|
+
}
|
|
4599
|
+
if (message.sik !== void 0) {
|
|
4600
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4371
4601
|
}
|
|
4372
4602
|
return obj;
|
|
4373
4603
|
},
|
|
@@ -4382,6 +4612,153 @@ var SetAccountTx = {
|
|
|
4382
4612
|
message.account = object.account ?? void 0;
|
|
4383
4613
|
message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
|
|
4384
4614
|
message.delegates = object.delegates?.map((e) => e) || [];
|
|
4615
|
+
message.sik = object.sik ?? void 0;
|
|
4616
|
+
return message;
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
function createBaseSikTx() {
|
|
4620
|
+
return { txtype: 0, sik: void 0 };
|
|
4621
|
+
}
|
|
4622
|
+
var SikTx = {
|
|
4623
|
+
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4624
|
+
if (message.txtype !== 0) {
|
|
4625
|
+
writer.uint32(8).int32(message.txtype);
|
|
4626
|
+
}
|
|
4627
|
+
if (message.sik !== void 0) {
|
|
4628
|
+
writer.uint32(26).bytes(message.sik);
|
|
4629
|
+
}
|
|
4630
|
+
return writer;
|
|
4631
|
+
},
|
|
4632
|
+
decode(input, length) {
|
|
4633
|
+
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
4634
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4635
|
+
const message = createBaseSikTx();
|
|
4636
|
+
while (reader.pos < end) {
|
|
4637
|
+
const tag = reader.uint32();
|
|
4638
|
+
switch (tag >>> 3) {
|
|
4639
|
+
case 1:
|
|
4640
|
+
if (tag !== 8) {
|
|
4641
|
+
break;
|
|
4642
|
+
}
|
|
4643
|
+
message.txtype = reader.int32();
|
|
4644
|
+
continue;
|
|
4645
|
+
case 3:
|
|
4646
|
+
if (tag !== 26) {
|
|
4647
|
+
break;
|
|
4648
|
+
}
|
|
4649
|
+
message.sik = reader.bytes();
|
|
4650
|
+
continue;
|
|
4651
|
+
}
|
|
4652
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4653
|
+
break;
|
|
4654
|
+
}
|
|
4655
|
+
reader.skipType(tag & 7);
|
|
4656
|
+
}
|
|
4657
|
+
return message;
|
|
4658
|
+
},
|
|
4659
|
+
fromJSON(object) {
|
|
4660
|
+
return {
|
|
4661
|
+
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4662
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : void 0
|
|
4663
|
+
};
|
|
4664
|
+
},
|
|
4665
|
+
toJSON(message) {
|
|
4666
|
+
const obj = {};
|
|
4667
|
+
if (message.txtype !== 0) {
|
|
4668
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4669
|
+
}
|
|
4670
|
+
if (message.sik !== void 0) {
|
|
4671
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4672
|
+
}
|
|
4673
|
+
return obj;
|
|
4674
|
+
},
|
|
4675
|
+
create(base) {
|
|
4676
|
+
return SikTx.fromPartial(base ?? {});
|
|
4677
|
+
},
|
|
4678
|
+
fromPartial(object) {
|
|
4679
|
+
const message = createBaseSikTx();
|
|
4680
|
+
message.txtype = object.txtype ?? 0;
|
|
4681
|
+
message.sik = object.sik ?? void 0;
|
|
4682
|
+
return message;
|
|
4683
|
+
}
|
|
4684
|
+
};
|
|
4685
|
+
function createBaseRegisterSIKTx() {
|
|
4686
|
+
return { electionId: new Uint8Array(0), censusProof: void 0, sik: new Uint8Array(0) };
|
|
4687
|
+
}
|
|
4688
|
+
var RegisterSIKTx = {
|
|
4689
|
+
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4690
|
+
if (message.electionId.length !== 0) {
|
|
4691
|
+
writer.uint32(10).bytes(message.electionId);
|
|
4692
|
+
}
|
|
4693
|
+
if (message.censusProof !== void 0) {
|
|
4694
|
+
Proof.encode(message.censusProof, writer.uint32(18).fork()).ldelim();
|
|
4695
|
+
}
|
|
4696
|
+
if (message.sik.length !== 0) {
|
|
4697
|
+
writer.uint32(26).bytes(message.sik);
|
|
4698
|
+
}
|
|
4699
|
+
return writer;
|
|
4700
|
+
},
|
|
4701
|
+
decode(input, length) {
|
|
4702
|
+
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
4703
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4704
|
+
const message = createBaseRegisterSIKTx();
|
|
4705
|
+
while (reader.pos < end) {
|
|
4706
|
+
const tag = reader.uint32();
|
|
4707
|
+
switch (tag >>> 3) {
|
|
4708
|
+
case 1:
|
|
4709
|
+
if (tag !== 10) {
|
|
4710
|
+
break;
|
|
4711
|
+
}
|
|
4712
|
+
message.electionId = reader.bytes();
|
|
4713
|
+
continue;
|
|
4714
|
+
case 2:
|
|
4715
|
+
if (tag !== 18) {
|
|
4716
|
+
break;
|
|
4717
|
+
}
|
|
4718
|
+
message.censusProof = Proof.decode(reader, reader.uint32());
|
|
4719
|
+
continue;
|
|
4720
|
+
case 3:
|
|
4721
|
+
if (tag !== 26) {
|
|
4722
|
+
break;
|
|
4723
|
+
}
|
|
4724
|
+
message.sik = reader.bytes();
|
|
4725
|
+
continue;
|
|
4726
|
+
}
|
|
4727
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4728
|
+
break;
|
|
4729
|
+
}
|
|
4730
|
+
reader.skipType(tag & 7);
|
|
4731
|
+
}
|
|
4732
|
+
return message;
|
|
4733
|
+
},
|
|
4734
|
+
fromJSON(object) {
|
|
4735
|
+
return {
|
|
4736
|
+
electionId: isSet(object.electionId) ? bytesFromBase64(object.electionId) : new Uint8Array(0),
|
|
4737
|
+
censusProof: isSet(object.censusProof) ? Proof.fromJSON(object.censusProof) : void 0,
|
|
4738
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : new Uint8Array(0)
|
|
4739
|
+
};
|
|
4740
|
+
},
|
|
4741
|
+
toJSON(message) {
|
|
4742
|
+
const obj = {};
|
|
4743
|
+
if (message.electionId.length !== 0) {
|
|
4744
|
+
obj.electionId = base64FromBytes(message.electionId);
|
|
4745
|
+
}
|
|
4746
|
+
if (message.censusProof !== void 0) {
|
|
4747
|
+
obj.censusProof = Proof.toJSON(message.censusProof);
|
|
4748
|
+
}
|
|
4749
|
+
if (message.sik.length !== 0) {
|
|
4750
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4751
|
+
}
|
|
4752
|
+
return obj;
|
|
4753
|
+
},
|
|
4754
|
+
create(base) {
|
|
4755
|
+
return RegisterSIKTx.fromPartial(base ?? {});
|
|
4756
|
+
},
|
|
4757
|
+
fromPartial(object) {
|
|
4758
|
+
const message = createBaseRegisterSIKTx();
|
|
4759
|
+
message.electionId = object.electionId ?? new Uint8Array(0);
|
|
4760
|
+
message.censusProof = object.censusProof !== void 0 && object.censusProof !== null ? Proof.fromPartial(object.censusProof) : void 0;
|
|
4761
|
+
message.sik = object.sik ?? new Uint8Array(0);
|
|
4385
4762
|
return message;
|
|
4386
4763
|
}
|
|
4387
4764
|
};
|
|
@@ -4409,25 +4786,25 @@ var CollectFaucetTx = {
|
|
|
4409
4786
|
const tag = reader.uint32();
|
|
4410
4787
|
switch (tag >>> 3) {
|
|
4411
4788
|
case 1:
|
|
4412
|
-
if (tag
|
|
4789
|
+
if (tag !== 8) {
|
|
4413
4790
|
break;
|
|
4414
4791
|
}
|
|
4415
4792
|
message.txType = reader.int32();
|
|
4416
4793
|
continue;
|
|
4417
4794
|
case 2:
|
|
4418
|
-
if (tag
|
|
4795
|
+
if (tag !== 18) {
|
|
4419
4796
|
break;
|
|
4420
4797
|
}
|
|
4421
4798
|
message.faucetPackage = FaucetPackage.decode(reader, reader.uint32());
|
|
4422
4799
|
continue;
|
|
4423
4800
|
case 3:
|
|
4424
|
-
if (tag
|
|
4801
|
+
if (tag !== 24) {
|
|
4425
4802
|
break;
|
|
4426
4803
|
}
|
|
4427
4804
|
message.nonce = reader.uint32();
|
|
4428
4805
|
continue;
|
|
4429
4806
|
}
|
|
4430
|
-
if ((tag & 7)
|
|
4807
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4431
4808
|
break;
|
|
4432
4809
|
}
|
|
4433
4810
|
reader.skipType(tag & 7);
|
|
@@ -4443,9 +4820,15 @@ var CollectFaucetTx = {
|
|
|
4443
4820
|
},
|
|
4444
4821
|
toJSON(message) {
|
|
4445
4822
|
const obj = {};
|
|
4446
|
-
message.txType !==
|
|
4447
|
-
|
|
4448
|
-
|
|
4823
|
+
if (message.txType !== 0) {
|
|
4824
|
+
obj.txType = txTypeToJSON(message.txType);
|
|
4825
|
+
}
|
|
4826
|
+
if (message.faucetPackage !== void 0) {
|
|
4827
|
+
obj.faucetPackage = FaucetPackage.toJSON(message.faucetPackage);
|
|
4828
|
+
}
|
|
4829
|
+
if (message.nonce !== 0) {
|
|
4830
|
+
obj.nonce = Math.round(message.nonce);
|
|
4831
|
+
}
|
|
4449
4832
|
return obj;
|
|
4450
4833
|
},
|
|
4451
4834
|
create(base) {
|
|
@@ -4460,7 +4843,7 @@ var CollectFaucetTx = {
|
|
|
4460
4843
|
}
|
|
4461
4844
|
};
|
|
4462
4845
|
function createBaseFaucetPayload() {
|
|
4463
|
-
return { identifier: 0, to: new Uint8Array(), amount: 0 };
|
|
4846
|
+
return { identifier: 0, to: new Uint8Array(0), amount: 0 };
|
|
4464
4847
|
}
|
|
4465
4848
|
var FaucetPayload = {
|
|
4466
4849
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4483,25 +4866,25 @@ var FaucetPayload = {
|
|
|
4483
4866
|
const tag = reader.uint32();
|
|
4484
4867
|
switch (tag >>> 3) {
|
|
4485
4868
|
case 1:
|
|
4486
|
-
if (tag
|
|
4869
|
+
if (tag !== 8) {
|
|
4487
4870
|
break;
|
|
4488
4871
|
}
|
|
4489
4872
|
message.identifier = longToNumber(reader.uint64());
|
|
4490
4873
|
continue;
|
|
4491
4874
|
case 2:
|
|
4492
|
-
if (tag
|
|
4875
|
+
if (tag !== 18) {
|
|
4493
4876
|
break;
|
|
4494
4877
|
}
|
|
4495
4878
|
message.to = reader.bytes();
|
|
4496
4879
|
continue;
|
|
4497
4880
|
case 3:
|
|
4498
|
-
if (tag
|
|
4881
|
+
if (tag !== 24) {
|
|
4499
4882
|
break;
|
|
4500
4883
|
}
|
|
4501
4884
|
message.amount = longToNumber(reader.uint64());
|
|
4502
4885
|
continue;
|
|
4503
4886
|
}
|
|
4504
|
-
if ((tag & 7)
|
|
4887
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4505
4888
|
break;
|
|
4506
4889
|
}
|
|
4507
4890
|
reader.skipType(tag & 7);
|
|
@@ -4511,15 +4894,21 @@ var FaucetPayload = {
|
|
|
4511
4894
|
fromJSON(object) {
|
|
4512
4895
|
return {
|
|
4513
4896
|
identifier: isSet(object.identifier) ? Number(object.identifier) : 0,
|
|
4514
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4897
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4515
4898
|
amount: isSet(object.amount) ? Number(object.amount) : 0
|
|
4516
4899
|
};
|
|
4517
4900
|
},
|
|
4518
4901
|
toJSON(message) {
|
|
4519
4902
|
const obj = {};
|
|
4520
|
-
message.identifier !==
|
|
4521
|
-
|
|
4522
|
-
|
|
4903
|
+
if (message.identifier !== 0) {
|
|
4904
|
+
obj.identifier = Math.round(message.identifier);
|
|
4905
|
+
}
|
|
4906
|
+
if (message.to.length !== 0) {
|
|
4907
|
+
obj.to = base64FromBytes(message.to);
|
|
4908
|
+
}
|
|
4909
|
+
if (message.amount !== 0) {
|
|
4910
|
+
obj.amount = Math.round(message.amount);
|
|
4911
|
+
}
|
|
4523
4912
|
return obj;
|
|
4524
4913
|
},
|
|
4525
4914
|
create(base) {
|
|
@@ -4528,13 +4917,13 @@ var FaucetPayload = {
|
|
|
4528
4917
|
fromPartial(object) {
|
|
4529
4918
|
const message = createBaseFaucetPayload();
|
|
4530
4919
|
message.identifier = object.identifier ?? 0;
|
|
4531
|
-
message.to = object.to ?? new Uint8Array();
|
|
4920
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4532
4921
|
message.amount = object.amount ?? 0;
|
|
4533
4922
|
return message;
|
|
4534
4923
|
}
|
|
4535
4924
|
};
|
|
4536
4925
|
function createBaseFaucetPackage() {
|
|
4537
|
-
return { payload: new Uint8Array(), signature: new Uint8Array() };
|
|
4926
|
+
return { payload: new Uint8Array(0), signature: new Uint8Array(0) };
|
|
4538
4927
|
}
|
|
4539
4928
|
var FaucetPackage = {
|
|
4540
4929
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4554,19 +4943,19 @@ var FaucetPackage = {
|
|
|
4554
4943
|
const tag = reader.uint32();
|
|
4555
4944
|
switch (tag >>> 3) {
|
|
4556
4945
|
case 1:
|
|
4557
|
-
if (tag
|
|
4946
|
+
if (tag !== 10) {
|
|
4558
4947
|
break;
|
|
4559
4948
|
}
|
|
4560
4949
|
message.payload = reader.bytes();
|
|
4561
4950
|
continue;
|
|
4562
4951
|
case 2:
|
|
4563
|
-
if (tag
|
|
4952
|
+
if (tag !== 18) {
|
|
4564
4953
|
break;
|
|
4565
4954
|
}
|
|
4566
4955
|
message.signature = reader.bytes();
|
|
4567
4956
|
continue;
|
|
4568
4957
|
}
|
|
4569
|
-
if ((tag & 7)
|
|
4958
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4570
4959
|
break;
|
|
4571
4960
|
}
|
|
4572
4961
|
reader.skipType(tag & 7);
|
|
@@ -4575,14 +4964,18 @@ var FaucetPackage = {
|
|
|
4575
4964
|
},
|
|
4576
4965
|
fromJSON(object) {
|
|
4577
4966
|
return {
|
|
4578
|
-
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(),
|
|
4579
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array()
|
|
4967
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
|
|
4968
|
+
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0)
|
|
4580
4969
|
};
|
|
4581
4970
|
},
|
|
4582
4971
|
toJSON(message) {
|
|
4583
4972
|
const obj = {};
|
|
4584
|
-
|
|
4585
|
-
|
|
4973
|
+
if (message.payload.length !== 0) {
|
|
4974
|
+
obj.payload = base64FromBytes(message.payload);
|
|
4975
|
+
}
|
|
4976
|
+
if (message.signature.length !== 0) {
|
|
4977
|
+
obj.signature = base64FromBytes(message.signature);
|
|
4978
|
+
}
|
|
4586
4979
|
return obj;
|
|
4587
4980
|
},
|
|
4588
4981
|
create(base) {
|
|
@@ -4590,13 +4983,13 @@ var FaucetPackage = {
|
|
|
4590
4983
|
},
|
|
4591
4984
|
fromPartial(object) {
|
|
4592
4985
|
const message = createBaseFaucetPackage();
|
|
4593
|
-
message.payload = object.payload ?? new Uint8Array();
|
|
4594
|
-
message.signature = object.signature ?? new Uint8Array();
|
|
4986
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
4987
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
4595
4988
|
return message;
|
|
4596
4989
|
}
|
|
4597
4990
|
};
|
|
4598
4991
|
function createBaseSetKeykeeperTx() {
|
|
4599
|
-
return { txtype: 0, nonce: 0, keykeeper: new Uint8Array() };
|
|
4992
|
+
return { txtype: 0, nonce: 0, keykeeper: new Uint8Array(0) };
|
|
4600
4993
|
}
|
|
4601
4994
|
var SetKeykeeperTx = {
|
|
4602
4995
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4619,25 +5012,25 @@ var SetKeykeeperTx = {
|
|
|
4619
5012
|
const tag = reader.uint32();
|
|
4620
5013
|
switch (tag >>> 3) {
|
|
4621
5014
|
case 1:
|
|
4622
|
-
if (tag
|
|
5015
|
+
if (tag !== 8) {
|
|
4623
5016
|
break;
|
|
4624
5017
|
}
|
|
4625
5018
|
message.txtype = reader.int32();
|
|
4626
5019
|
continue;
|
|
4627
5020
|
case 2:
|
|
4628
|
-
if (tag
|
|
5021
|
+
if (tag !== 16) {
|
|
4629
5022
|
break;
|
|
4630
5023
|
}
|
|
4631
5024
|
message.nonce = reader.uint32();
|
|
4632
5025
|
continue;
|
|
4633
5026
|
case 3:
|
|
4634
|
-
if (tag
|
|
5027
|
+
if (tag !== 26) {
|
|
4635
5028
|
break;
|
|
4636
5029
|
}
|
|
4637
5030
|
message.keykeeper = reader.bytes();
|
|
4638
5031
|
continue;
|
|
4639
5032
|
}
|
|
4640
|
-
if ((tag & 7)
|
|
5033
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4641
5034
|
break;
|
|
4642
5035
|
}
|
|
4643
5036
|
reader.skipType(tag & 7);
|
|
@@ -4648,14 +5041,20 @@ var SetKeykeeperTx = {
|
|
|
4648
5041
|
return {
|
|
4649
5042
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4650
5043
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4651
|
-
keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array()
|
|
5044
|
+
keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array(0)
|
|
4652
5045
|
};
|
|
4653
5046
|
},
|
|
4654
5047
|
toJSON(message) {
|
|
4655
5048
|
const obj = {};
|
|
4656
|
-
message.txtype !==
|
|
4657
|
-
|
|
4658
|
-
|
|
5049
|
+
if (message.txtype !== 0) {
|
|
5050
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
5051
|
+
}
|
|
5052
|
+
if (message.nonce !== 0) {
|
|
5053
|
+
obj.nonce = Math.round(message.nonce);
|
|
5054
|
+
}
|
|
5055
|
+
if (message.keykeeper.length !== 0) {
|
|
5056
|
+
obj.keykeeper = base64FromBytes(message.keykeeper);
|
|
5057
|
+
}
|
|
4659
5058
|
return obj;
|
|
4660
5059
|
},
|
|
4661
5060
|
create(base) {
|
|
@@ -4665,17 +5064,17 @@ var SetKeykeeperTx = {
|
|
|
4665
5064
|
const message = createBaseSetKeykeeperTx();
|
|
4666
5065
|
message.txtype = object.txtype ?? 0;
|
|
4667
5066
|
message.nonce = object.nonce ?? 0;
|
|
4668
|
-
message.keykeeper = object.keykeeper ?? new Uint8Array();
|
|
5067
|
+
message.keykeeper = object.keykeeper ?? new Uint8Array(0);
|
|
4669
5068
|
return message;
|
|
4670
5069
|
}
|
|
4671
5070
|
};
|
|
4672
5071
|
function createBaseProcess() {
|
|
4673
5072
|
return {
|
|
4674
|
-
processId: new Uint8Array(),
|
|
4675
|
-
entityId: new Uint8Array(),
|
|
5073
|
+
processId: new Uint8Array(0),
|
|
5074
|
+
entityId: new Uint8Array(0),
|
|
4676
5075
|
startBlock: 0,
|
|
4677
5076
|
blockCount: 0,
|
|
4678
|
-
censusRoot: new Uint8Array(),
|
|
5077
|
+
censusRoot: new Uint8Array(0),
|
|
4679
5078
|
censusURI: void 0,
|
|
4680
5079
|
encryptionPrivateKeys: [],
|
|
4681
5080
|
encryptionPublicKeys: [],
|
|
@@ -4689,8 +5088,7 @@ function createBaseProcess() {
|
|
|
4689
5088
|
questionCount: void 0,
|
|
4690
5089
|
voteOptions: void 0,
|
|
4691
5090
|
censusOrigin: 0,
|
|
4692
|
-
results:
|
|
4693
|
-
resultsSignatures: [],
|
|
5091
|
+
results: void 0,
|
|
4694
5092
|
ethIndexSlot: void 0,
|
|
4695
5093
|
sourceBlockHeight: void 0,
|
|
4696
5094
|
owner: void 0,
|
|
@@ -4760,11 +5158,8 @@ var Process = {
|
|
|
4760
5158
|
if (message.censusOrigin !== 0) {
|
|
4761
5159
|
writer.uint32(160).int32(message.censusOrigin);
|
|
4762
5160
|
}
|
|
4763
|
-
|
|
4764
|
-
ProcessResult.encode(
|
|
4765
|
-
}
|
|
4766
|
-
for (const v of message.resultsSignatures) {
|
|
4767
|
-
writer.uint32(178).bytes(v);
|
|
5161
|
+
if (message.results !== void 0) {
|
|
5162
|
+
ProcessResult.encode(message.results, writer.uint32(170).fork()).ldelim();
|
|
4768
5163
|
}
|
|
4769
5164
|
if (message.ethIndexSlot !== void 0) {
|
|
4770
5165
|
writer.uint32(184).uint32(message.ethIndexSlot);
|
|
@@ -4809,193 +5204,187 @@ var Process = {
|
|
|
4809
5204
|
const tag = reader.uint32();
|
|
4810
5205
|
switch (tag >>> 3) {
|
|
4811
5206
|
case 1:
|
|
4812
|
-
if (tag
|
|
5207
|
+
if (tag !== 10) {
|
|
4813
5208
|
break;
|
|
4814
5209
|
}
|
|
4815
5210
|
message.processId = reader.bytes();
|
|
4816
5211
|
continue;
|
|
4817
5212
|
case 2:
|
|
4818
|
-
if (tag
|
|
5213
|
+
if (tag !== 18) {
|
|
4819
5214
|
break;
|
|
4820
5215
|
}
|
|
4821
5216
|
message.entityId = reader.bytes();
|
|
4822
5217
|
continue;
|
|
4823
5218
|
case 3:
|
|
4824
|
-
if (tag
|
|
5219
|
+
if (tag !== 24) {
|
|
4825
5220
|
break;
|
|
4826
5221
|
}
|
|
4827
5222
|
message.startBlock = reader.uint32();
|
|
4828
5223
|
continue;
|
|
4829
5224
|
case 4:
|
|
4830
|
-
if (tag
|
|
5225
|
+
if (tag !== 32) {
|
|
4831
5226
|
break;
|
|
4832
5227
|
}
|
|
4833
5228
|
message.blockCount = reader.uint32();
|
|
4834
5229
|
continue;
|
|
4835
5230
|
case 5:
|
|
4836
|
-
if (tag
|
|
5231
|
+
if (tag !== 42) {
|
|
4837
5232
|
break;
|
|
4838
5233
|
}
|
|
4839
5234
|
message.censusRoot = reader.bytes();
|
|
4840
5235
|
continue;
|
|
4841
5236
|
case 6:
|
|
4842
|
-
if (tag
|
|
5237
|
+
if (tag !== 50) {
|
|
4843
5238
|
break;
|
|
4844
5239
|
}
|
|
4845
5240
|
message.censusURI = reader.string();
|
|
4846
5241
|
continue;
|
|
4847
5242
|
case 8:
|
|
4848
|
-
if (tag
|
|
5243
|
+
if (tag !== 66) {
|
|
4849
5244
|
break;
|
|
4850
5245
|
}
|
|
4851
5246
|
message.encryptionPrivateKeys.push(reader.string());
|
|
4852
5247
|
continue;
|
|
4853
5248
|
case 9:
|
|
4854
|
-
if (tag
|
|
5249
|
+
if (tag !== 74) {
|
|
4855
5250
|
break;
|
|
4856
5251
|
}
|
|
4857
5252
|
message.encryptionPublicKeys.push(reader.string());
|
|
4858
5253
|
continue;
|
|
4859
5254
|
case 11:
|
|
4860
|
-
if (tag
|
|
5255
|
+
if (tag !== 88) {
|
|
4861
5256
|
break;
|
|
4862
5257
|
}
|
|
4863
5258
|
message.keyIndex = reader.uint32();
|
|
4864
5259
|
continue;
|
|
4865
5260
|
case 12:
|
|
4866
|
-
if (tag
|
|
5261
|
+
if (tag !== 96) {
|
|
4867
5262
|
break;
|
|
4868
5263
|
}
|
|
4869
5264
|
message.status = reader.int32();
|
|
4870
5265
|
continue;
|
|
4871
5266
|
case 13:
|
|
4872
|
-
if (tag
|
|
5267
|
+
if (tag !== 106) {
|
|
4873
5268
|
break;
|
|
4874
5269
|
}
|
|
4875
5270
|
message.paramsSignature = reader.bytes();
|
|
4876
5271
|
continue;
|
|
4877
5272
|
case 14:
|
|
4878
|
-
if (tag
|
|
5273
|
+
if (tag !== 112) {
|
|
4879
5274
|
break;
|
|
4880
5275
|
}
|
|
4881
5276
|
message.namespace = reader.uint32();
|
|
4882
5277
|
continue;
|
|
4883
5278
|
case 15:
|
|
4884
|
-
if (tag
|
|
5279
|
+
if (tag !== 122) {
|
|
4885
5280
|
break;
|
|
4886
5281
|
}
|
|
4887
5282
|
message.envelopeType = EnvelopeType.decode(reader, reader.uint32());
|
|
4888
5283
|
continue;
|
|
4889
5284
|
case 16:
|
|
4890
|
-
if (tag
|
|
5285
|
+
if (tag !== 130) {
|
|
4891
5286
|
break;
|
|
4892
5287
|
}
|
|
4893
5288
|
message.mode = ProcessMode.decode(reader, reader.uint32());
|
|
4894
5289
|
continue;
|
|
4895
5290
|
case 17:
|
|
4896
|
-
if (tag
|
|
5291
|
+
if (tag !== 136) {
|
|
4897
5292
|
break;
|
|
4898
5293
|
}
|
|
4899
5294
|
message.questionIndex = reader.uint32();
|
|
4900
5295
|
continue;
|
|
4901
5296
|
case 18:
|
|
4902
|
-
if (tag
|
|
5297
|
+
if (tag !== 144) {
|
|
4903
5298
|
break;
|
|
4904
5299
|
}
|
|
4905
5300
|
message.questionCount = reader.uint32();
|
|
4906
5301
|
continue;
|
|
4907
5302
|
case 19:
|
|
4908
|
-
if (tag
|
|
5303
|
+
if (tag !== 154) {
|
|
4909
5304
|
break;
|
|
4910
5305
|
}
|
|
4911
5306
|
message.voteOptions = ProcessVoteOptions.decode(reader, reader.uint32());
|
|
4912
5307
|
continue;
|
|
4913
5308
|
case 20:
|
|
4914
|
-
if (tag
|
|
5309
|
+
if (tag !== 160) {
|
|
4915
5310
|
break;
|
|
4916
5311
|
}
|
|
4917
5312
|
message.censusOrigin = reader.int32();
|
|
4918
5313
|
continue;
|
|
4919
5314
|
case 21:
|
|
4920
|
-
if (tag
|
|
4921
|
-
break;
|
|
4922
|
-
}
|
|
4923
|
-
message.results.push(ProcessResult.decode(reader, reader.uint32()));
|
|
4924
|
-
continue;
|
|
4925
|
-
case 22:
|
|
4926
|
-
if (tag != 178) {
|
|
5315
|
+
if (tag !== 170) {
|
|
4927
5316
|
break;
|
|
4928
5317
|
}
|
|
4929
|
-
message.
|
|
5318
|
+
message.results = ProcessResult.decode(reader, reader.uint32());
|
|
4930
5319
|
continue;
|
|
4931
5320
|
case 23:
|
|
4932
|
-
if (tag
|
|
5321
|
+
if (tag !== 184) {
|
|
4933
5322
|
break;
|
|
4934
5323
|
}
|
|
4935
5324
|
message.ethIndexSlot = reader.uint32();
|
|
4936
5325
|
continue;
|
|
4937
5326
|
case 24:
|
|
4938
|
-
if (tag
|
|
5327
|
+
if (tag !== 192) {
|
|
4939
5328
|
break;
|
|
4940
5329
|
}
|
|
4941
5330
|
message.sourceBlockHeight = longToNumber(reader.uint64());
|
|
4942
5331
|
continue;
|
|
4943
5332
|
case 25:
|
|
4944
|
-
if (tag
|
|
5333
|
+
if (tag !== 202) {
|
|
4945
5334
|
break;
|
|
4946
5335
|
}
|
|
4947
5336
|
message.owner = reader.bytes();
|
|
4948
5337
|
continue;
|
|
4949
5338
|
case 26:
|
|
4950
|
-
if (tag
|
|
5339
|
+
if (tag !== 210) {
|
|
4951
5340
|
break;
|
|
4952
5341
|
}
|
|
4953
5342
|
message.metadata = reader.string();
|
|
4954
5343
|
continue;
|
|
4955
5344
|
case 27:
|
|
4956
|
-
if (tag
|
|
5345
|
+
if (tag !== 216) {
|
|
4957
5346
|
break;
|
|
4958
5347
|
}
|
|
4959
5348
|
message.sourceNetworkId = reader.int32();
|
|
4960
5349
|
continue;
|
|
4961
5350
|
case 28:
|
|
4962
|
-
if (tag
|
|
5351
|
+
if (tag !== 224) {
|
|
4963
5352
|
break;
|
|
4964
5353
|
}
|
|
4965
5354
|
message.maxCensusSize = longToNumber(reader.uint64());
|
|
4966
5355
|
continue;
|
|
4967
5356
|
case 29:
|
|
4968
|
-
if (tag
|
|
5357
|
+
if (tag !== 234) {
|
|
4969
5358
|
break;
|
|
4970
5359
|
}
|
|
4971
5360
|
message.rollingCensusRoot = reader.bytes();
|
|
4972
5361
|
continue;
|
|
4973
5362
|
case 30:
|
|
4974
|
-
if (tag
|
|
5363
|
+
if (tag !== 240) {
|
|
4975
5364
|
break;
|
|
4976
5365
|
}
|
|
4977
5366
|
message.rollingCensusSize = longToNumber(reader.uint64());
|
|
4978
5367
|
continue;
|
|
4979
5368
|
case 31:
|
|
4980
|
-
if (tag
|
|
5369
|
+
if (tag !== 250) {
|
|
4981
5370
|
break;
|
|
4982
5371
|
}
|
|
4983
5372
|
message.nullifiersRoot = reader.bytes();
|
|
4984
5373
|
continue;
|
|
4985
5374
|
case 32:
|
|
4986
|
-
if (tag
|
|
5375
|
+
if (tag !== 258) {
|
|
4987
5376
|
break;
|
|
4988
5377
|
}
|
|
4989
5378
|
message.sourceNetworkContractAddr = reader.bytes();
|
|
4990
5379
|
continue;
|
|
4991
5380
|
case 33:
|
|
4992
|
-
if (tag
|
|
5381
|
+
if (tag !== 264) {
|
|
4993
5382
|
break;
|
|
4994
5383
|
}
|
|
4995
5384
|
message.tokenDecimals = reader.uint32();
|
|
4996
5385
|
continue;
|
|
4997
5386
|
}
|
|
4998
|
-
if ((tag & 7)
|
|
5387
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4999
5388
|
break;
|
|
5000
5389
|
}
|
|
5001
5390
|
reader.skipType(tag & 7);
|
|
@@ -5004,11 +5393,11 @@ var Process = {
|
|
|
5004
5393
|
},
|
|
5005
5394
|
fromJSON(object) {
|
|
5006
5395
|
return {
|
|
5007
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
5008
|
-
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(),
|
|
5396
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
5397
|
+
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(0),
|
|
5009
5398
|
startBlock: isSet(object.startBlock) ? Number(object.startBlock) : 0,
|
|
5010
5399
|
blockCount: isSet(object.blockCount) ? Number(object.blockCount) : 0,
|
|
5011
|
-
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(),
|
|
5400
|
+
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(0),
|
|
5012
5401
|
censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
|
|
5013
5402
|
encryptionPrivateKeys: Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => String(e)) : [],
|
|
5014
5403
|
encryptionPublicKeys: Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => String(e)) : [],
|
|
@@ -5022,8 +5411,7 @@ var Process = {
|
|
|
5022
5411
|
questionCount: isSet(object.questionCount) ? Number(object.questionCount) : void 0,
|
|
5023
5412
|
voteOptions: isSet(object.voteOptions) ? ProcessVoteOptions.fromJSON(object.voteOptions) : void 0,
|
|
5024
5413
|
censusOrigin: isSet(object.censusOrigin) ? censusOriginFromJSON(object.censusOrigin) : 0,
|
|
5025
|
-
results:
|
|
5026
|
-
resultsSignatures: Array.isArray(object?.resultsSignatures) ? object.resultsSignatures.map((e) => bytesFromBase64(e)) : [],
|
|
5414
|
+
results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
|
|
5027
5415
|
ethIndexSlot: isSet(object.ethIndexSlot) ? Number(object.ethIndexSlot) : void 0,
|
|
5028
5416
|
sourceBlockHeight: isSet(object.sourceBlockHeight) ? Number(object.sourceBlockHeight) : void 0,
|
|
5029
5417
|
owner: isSet(object.owner) ? bytesFromBase64(object.owner) : void 0,
|
|
@@ -5039,55 +5427,96 @@ var Process = {
|
|
|
5039
5427
|
},
|
|
5040
5428
|
toJSON(message) {
|
|
5041
5429
|
const obj = {};
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
message.
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
if (message.
|
|
5049
|
-
obj.
|
|
5050
|
-
}
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
message.
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
);
|
|
5077
|
-
}
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
message.
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
message.
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
message.
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
message.
|
|
5430
|
+
if (message.processId.length !== 0) {
|
|
5431
|
+
obj.processId = base64FromBytes(message.processId);
|
|
5432
|
+
}
|
|
5433
|
+
if (message.entityId.length !== 0) {
|
|
5434
|
+
obj.entityId = base64FromBytes(message.entityId);
|
|
5435
|
+
}
|
|
5436
|
+
if (message.startBlock !== 0) {
|
|
5437
|
+
obj.startBlock = Math.round(message.startBlock);
|
|
5438
|
+
}
|
|
5439
|
+
if (message.blockCount !== 0) {
|
|
5440
|
+
obj.blockCount = Math.round(message.blockCount);
|
|
5441
|
+
}
|
|
5442
|
+
if (message.censusRoot.length !== 0) {
|
|
5443
|
+
obj.censusRoot = base64FromBytes(message.censusRoot);
|
|
5444
|
+
}
|
|
5445
|
+
if (message.censusURI !== void 0) {
|
|
5446
|
+
obj.censusURI = message.censusURI;
|
|
5447
|
+
}
|
|
5448
|
+
if (message.encryptionPrivateKeys?.length) {
|
|
5449
|
+
obj.encryptionPrivateKeys = message.encryptionPrivateKeys;
|
|
5450
|
+
}
|
|
5451
|
+
if (message.encryptionPublicKeys?.length) {
|
|
5452
|
+
obj.encryptionPublicKeys = message.encryptionPublicKeys;
|
|
5453
|
+
}
|
|
5454
|
+
if (message.keyIndex !== void 0) {
|
|
5455
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
5456
|
+
}
|
|
5457
|
+
if (message.status !== 0) {
|
|
5458
|
+
obj.status = processStatusToJSON(message.status);
|
|
5459
|
+
}
|
|
5460
|
+
if (message.paramsSignature !== void 0) {
|
|
5461
|
+
obj.paramsSignature = base64FromBytes(message.paramsSignature);
|
|
5462
|
+
}
|
|
5463
|
+
if (message.namespace !== 0) {
|
|
5464
|
+
obj.namespace = Math.round(message.namespace);
|
|
5465
|
+
}
|
|
5466
|
+
if (message.envelopeType !== void 0) {
|
|
5467
|
+
obj.envelopeType = EnvelopeType.toJSON(message.envelopeType);
|
|
5468
|
+
}
|
|
5469
|
+
if (message.mode !== void 0) {
|
|
5470
|
+
obj.mode = ProcessMode.toJSON(message.mode);
|
|
5471
|
+
}
|
|
5472
|
+
if (message.questionIndex !== void 0) {
|
|
5473
|
+
obj.questionIndex = Math.round(message.questionIndex);
|
|
5474
|
+
}
|
|
5475
|
+
if (message.questionCount !== void 0) {
|
|
5476
|
+
obj.questionCount = Math.round(message.questionCount);
|
|
5477
|
+
}
|
|
5478
|
+
if (message.voteOptions !== void 0) {
|
|
5479
|
+
obj.voteOptions = ProcessVoteOptions.toJSON(message.voteOptions);
|
|
5480
|
+
}
|
|
5481
|
+
if (message.censusOrigin !== 0) {
|
|
5482
|
+
obj.censusOrigin = censusOriginToJSON(message.censusOrigin);
|
|
5483
|
+
}
|
|
5484
|
+
if (message.results !== void 0) {
|
|
5485
|
+
obj.results = ProcessResult.toJSON(message.results);
|
|
5486
|
+
}
|
|
5487
|
+
if (message.ethIndexSlot !== void 0) {
|
|
5488
|
+
obj.ethIndexSlot = Math.round(message.ethIndexSlot);
|
|
5489
|
+
}
|
|
5490
|
+
if (message.sourceBlockHeight !== void 0) {
|
|
5491
|
+
obj.sourceBlockHeight = Math.round(message.sourceBlockHeight);
|
|
5492
|
+
}
|
|
5493
|
+
if (message.owner !== void 0) {
|
|
5494
|
+
obj.owner = base64FromBytes(message.owner);
|
|
5495
|
+
}
|
|
5496
|
+
if (message.metadata !== void 0) {
|
|
5497
|
+
obj.metadata = message.metadata;
|
|
5498
|
+
}
|
|
5499
|
+
if (message.sourceNetworkId !== 0) {
|
|
5500
|
+
obj.sourceNetworkId = sourceNetworkIdToJSON(message.sourceNetworkId);
|
|
5501
|
+
}
|
|
5502
|
+
if (message.maxCensusSize !== 0) {
|
|
5503
|
+
obj.maxCensusSize = Math.round(message.maxCensusSize);
|
|
5504
|
+
}
|
|
5505
|
+
if (message.rollingCensusRoot !== void 0) {
|
|
5506
|
+
obj.rollingCensusRoot = base64FromBytes(message.rollingCensusRoot);
|
|
5507
|
+
}
|
|
5508
|
+
if (message.rollingCensusSize !== void 0) {
|
|
5509
|
+
obj.rollingCensusSize = Math.round(message.rollingCensusSize);
|
|
5510
|
+
}
|
|
5511
|
+
if (message.nullifiersRoot !== void 0) {
|
|
5512
|
+
obj.nullifiersRoot = base64FromBytes(message.nullifiersRoot);
|
|
5513
|
+
}
|
|
5514
|
+
if (message.sourceNetworkContractAddr !== void 0) {
|
|
5515
|
+
obj.sourceNetworkContractAddr = base64FromBytes(message.sourceNetworkContractAddr);
|
|
5516
|
+
}
|
|
5517
|
+
if (message.tokenDecimals !== void 0) {
|
|
5518
|
+
obj.tokenDecimals = Math.round(message.tokenDecimals);
|
|
5519
|
+
}
|
|
5091
5520
|
return obj;
|
|
5092
5521
|
},
|
|
5093
5522
|
create(base) {
|
|
@@ -5095,11 +5524,11 @@ var Process = {
|
|
|
5095
5524
|
},
|
|
5096
5525
|
fromPartial(object) {
|
|
5097
5526
|
const message = createBaseProcess();
|
|
5098
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
5099
|
-
message.entityId = object.entityId ?? new Uint8Array();
|
|
5527
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
5528
|
+
message.entityId = object.entityId ?? new Uint8Array(0);
|
|
5100
5529
|
message.startBlock = object.startBlock ?? 0;
|
|
5101
5530
|
message.blockCount = object.blockCount ?? 0;
|
|
5102
|
-
message.censusRoot = object.censusRoot ?? new Uint8Array();
|
|
5531
|
+
message.censusRoot = object.censusRoot ?? new Uint8Array(0);
|
|
5103
5532
|
message.censusURI = object.censusURI ?? void 0;
|
|
5104
5533
|
message.encryptionPrivateKeys = object.encryptionPrivateKeys?.map((e) => e) || [];
|
|
5105
5534
|
message.encryptionPublicKeys = object.encryptionPublicKeys?.map((e) => e) || [];
|
|
@@ -5113,8 +5542,7 @@ var Process = {
|
|
|
5113
5542
|
message.questionCount = object.questionCount ?? void 0;
|
|
5114
5543
|
message.voteOptions = object.voteOptions !== void 0 && object.voteOptions !== null ? ProcessVoteOptions.fromPartial(object.voteOptions) : void 0;
|
|
5115
5544
|
message.censusOrigin = object.censusOrigin ?? 0;
|
|
5116
|
-
message.results = object.results
|
|
5117
|
-
message.resultsSignatures = object.resultsSignatures?.map((e) => e) || [];
|
|
5545
|
+
message.results = object.results !== void 0 && object.results !== null ? ProcessResult.fromPartial(object.results) : void 0;
|
|
5118
5546
|
message.ethIndexSlot = object.ethIndexSlot ?? void 0;
|
|
5119
5547
|
message.sourceBlockHeight = object.sourceBlockHeight ?? void 0;
|
|
5120
5548
|
message.owner = object.owner ?? void 0;
|
|
@@ -5159,37 +5587,37 @@ var EnvelopeType = {
|
|
|
5159
5587
|
const tag = reader.uint32();
|
|
5160
5588
|
switch (tag >>> 3) {
|
|
5161
5589
|
case 1:
|
|
5162
|
-
if (tag
|
|
5590
|
+
if (tag !== 8) {
|
|
5163
5591
|
break;
|
|
5164
5592
|
}
|
|
5165
5593
|
message.serial = reader.bool();
|
|
5166
5594
|
continue;
|
|
5167
5595
|
case 2:
|
|
5168
|
-
if (tag
|
|
5596
|
+
if (tag !== 16) {
|
|
5169
5597
|
break;
|
|
5170
5598
|
}
|
|
5171
5599
|
message.anonymous = reader.bool();
|
|
5172
5600
|
continue;
|
|
5173
5601
|
case 3:
|
|
5174
|
-
if (tag
|
|
5602
|
+
if (tag !== 24) {
|
|
5175
5603
|
break;
|
|
5176
5604
|
}
|
|
5177
5605
|
message.encryptedVotes = reader.bool();
|
|
5178
5606
|
continue;
|
|
5179
5607
|
case 4:
|
|
5180
|
-
if (tag
|
|
5608
|
+
if (tag !== 32) {
|
|
5181
5609
|
break;
|
|
5182
5610
|
}
|
|
5183
5611
|
message.uniqueValues = reader.bool();
|
|
5184
5612
|
continue;
|
|
5185
5613
|
case 5:
|
|
5186
|
-
if (tag
|
|
5614
|
+
if (tag !== 40) {
|
|
5187
5615
|
break;
|
|
5188
5616
|
}
|
|
5189
5617
|
message.costFromWeight = reader.bool();
|
|
5190
5618
|
continue;
|
|
5191
5619
|
}
|
|
5192
|
-
if ((tag & 7)
|
|
5620
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5193
5621
|
break;
|
|
5194
5622
|
}
|
|
5195
5623
|
reader.skipType(tag & 7);
|
|
@@ -5207,11 +5635,21 @@ var EnvelopeType = {
|
|
|
5207
5635
|
},
|
|
5208
5636
|
toJSON(message) {
|
|
5209
5637
|
const obj = {};
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5638
|
+
if (message.serial === true) {
|
|
5639
|
+
obj.serial = message.serial;
|
|
5640
|
+
}
|
|
5641
|
+
if (message.anonymous === true) {
|
|
5642
|
+
obj.anonymous = message.anonymous;
|
|
5643
|
+
}
|
|
5644
|
+
if (message.encryptedVotes === true) {
|
|
5645
|
+
obj.encryptedVotes = message.encryptedVotes;
|
|
5646
|
+
}
|
|
5647
|
+
if (message.uniqueValues === true) {
|
|
5648
|
+
obj.uniqueValues = message.uniqueValues;
|
|
5649
|
+
}
|
|
5650
|
+
if (message.costFromWeight === true) {
|
|
5651
|
+
obj.costFromWeight = message.costFromWeight;
|
|
5652
|
+
}
|
|
5215
5653
|
return obj;
|
|
5216
5654
|
},
|
|
5217
5655
|
create(base) {
|
|
@@ -5257,37 +5695,37 @@ var ProcessMode = {
|
|
|
5257
5695
|
const tag = reader.uint32();
|
|
5258
5696
|
switch (tag >>> 3) {
|
|
5259
5697
|
case 1:
|
|
5260
|
-
if (tag
|
|
5698
|
+
if (tag !== 8) {
|
|
5261
5699
|
break;
|
|
5262
5700
|
}
|
|
5263
5701
|
message.autoStart = reader.bool();
|
|
5264
5702
|
continue;
|
|
5265
5703
|
case 2:
|
|
5266
|
-
if (tag
|
|
5704
|
+
if (tag !== 16) {
|
|
5267
5705
|
break;
|
|
5268
5706
|
}
|
|
5269
5707
|
message.interruptible = reader.bool();
|
|
5270
5708
|
continue;
|
|
5271
5709
|
case 3:
|
|
5272
|
-
if (tag
|
|
5710
|
+
if (tag !== 24) {
|
|
5273
5711
|
break;
|
|
5274
5712
|
}
|
|
5275
5713
|
message.dynamicCensus = reader.bool();
|
|
5276
5714
|
continue;
|
|
5277
5715
|
case 4:
|
|
5278
|
-
if (tag
|
|
5716
|
+
if (tag !== 32) {
|
|
5279
5717
|
break;
|
|
5280
5718
|
}
|
|
5281
5719
|
message.encryptedMetaData = reader.bool();
|
|
5282
5720
|
continue;
|
|
5283
5721
|
case 5:
|
|
5284
|
-
if (tag
|
|
5722
|
+
if (tag !== 40) {
|
|
5285
5723
|
break;
|
|
5286
5724
|
}
|
|
5287
5725
|
message.preRegister = reader.bool();
|
|
5288
5726
|
continue;
|
|
5289
5727
|
}
|
|
5290
|
-
if ((tag & 7)
|
|
5728
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5291
5729
|
break;
|
|
5292
5730
|
}
|
|
5293
5731
|
reader.skipType(tag & 7);
|
|
@@ -5305,11 +5743,21 @@ var ProcessMode = {
|
|
|
5305
5743
|
},
|
|
5306
5744
|
toJSON(message) {
|
|
5307
5745
|
const obj = {};
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5746
|
+
if (message.autoStart === true) {
|
|
5747
|
+
obj.autoStart = message.autoStart;
|
|
5748
|
+
}
|
|
5749
|
+
if (message.interruptible === true) {
|
|
5750
|
+
obj.interruptible = message.interruptible;
|
|
5751
|
+
}
|
|
5752
|
+
if (message.dynamicCensus === true) {
|
|
5753
|
+
obj.dynamicCensus = message.dynamicCensus;
|
|
5754
|
+
}
|
|
5755
|
+
if (message.encryptedMetaData === true) {
|
|
5756
|
+
obj.encryptedMetaData = message.encryptedMetaData;
|
|
5757
|
+
}
|
|
5758
|
+
if (message.preRegister === true) {
|
|
5759
|
+
obj.preRegister = message.preRegister;
|
|
5760
|
+
}
|
|
5313
5761
|
return obj;
|
|
5314
5762
|
},
|
|
5315
5763
|
create(base) {
|
|
@@ -5355,37 +5803,37 @@ var ProcessVoteOptions = {
|
|
|
5355
5803
|
const tag = reader.uint32();
|
|
5356
5804
|
switch (tag >>> 3) {
|
|
5357
5805
|
case 1:
|
|
5358
|
-
if (tag
|
|
5806
|
+
if (tag !== 8) {
|
|
5359
5807
|
break;
|
|
5360
5808
|
}
|
|
5361
5809
|
message.maxCount = reader.uint32();
|
|
5362
5810
|
continue;
|
|
5363
5811
|
case 2:
|
|
5364
|
-
if (tag
|
|
5812
|
+
if (tag !== 16) {
|
|
5365
5813
|
break;
|
|
5366
5814
|
}
|
|
5367
5815
|
message.maxValue = reader.uint32();
|
|
5368
5816
|
continue;
|
|
5369
5817
|
case 3:
|
|
5370
|
-
if (tag
|
|
5818
|
+
if (tag !== 24) {
|
|
5371
5819
|
break;
|
|
5372
5820
|
}
|
|
5373
5821
|
message.maxVoteOverwrites = reader.uint32();
|
|
5374
5822
|
continue;
|
|
5375
5823
|
case 4:
|
|
5376
|
-
if (tag
|
|
5824
|
+
if (tag !== 32) {
|
|
5377
5825
|
break;
|
|
5378
5826
|
}
|
|
5379
5827
|
message.maxTotalCost = reader.uint32();
|
|
5380
5828
|
continue;
|
|
5381
5829
|
case 5:
|
|
5382
|
-
if (tag
|
|
5830
|
+
if (tag !== 40) {
|
|
5383
5831
|
break;
|
|
5384
5832
|
}
|
|
5385
5833
|
message.costExponent = reader.uint32();
|
|
5386
5834
|
continue;
|
|
5387
5835
|
}
|
|
5388
|
-
if ((tag & 7)
|
|
5836
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5389
5837
|
break;
|
|
5390
5838
|
}
|
|
5391
5839
|
reader.skipType(tag & 7);
|
|
@@ -5403,11 +5851,21 @@ var ProcessVoteOptions = {
|
|
|
5403
5851
|
},
|
|
5404
5852
|
toJSON(message) {
|
|
5405
5853
|
const obj = {};
|
|
5406
|
-
message.maxCount !==
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
message.
|
|
5410
|
-
|
|
5854
|
+
if (message.maxCount !== 0) {
|
|
5855
|
+
obj.maxCount = Math.round(message.maxCount);
|
|
5856
|
+
}
|
|
5857
|
+
if (message.maxValue !== 0) {
|
|
5858
|
+
obj.maxValue = Math.round(message.maxValue);
|
|
5859
|
+
}
|
|
5860
|
+
if (message.maxVoteOverwrites !== 0) {
|
|
5861
|
+
obj.maxVoteOverwrites = Math.round(message.maxVoteOverwrites);
|
|
5862
|
+
}
|
|
5863
|
+
if (message.maxTotalCost !== 0) {
|
|
5864
|
+
obj.maxTotalCost = Math.round(message.maxTotalCost);
|
|
5865
|
+
}
|
|
5866
|
+
if (message.costExponent !== 0) {
|
|
5867
|
+
obj.costExponent = Math.round(message.costExponent);
|
|
5868
|
+
}
|
|
5411
5869
|
return obj;
|
|
5412
5870
|
},
|
|
5413
5871
|
create(base) {
|
|
@@ -5441,13 +5899,13 @@ var OracleList = {
|
|
|
5441
5899
|
const tag = reader.uint32();
|
|
5442
5900
|
switch (tag >>> 3) {
|
|
5443
5901
|
case 1:
|
|
5444
|
-
if (tag
|
|
5902
|
+
if (tag !== 10) {
|
|
5445
5903
|
break;
|
|
5446
5904
|
}
|
|
5447
5905
|
message.oracles.push(reader.bytes());
|
|
5448
5906
|
continue;
|
|
5449
5907
|
}
|
|
5450
|
-
if ((tag & 7)
|
|
5908
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5451
5909
|
break;
|
|
5452
5910
|
}
|
|
5453
5911
|
reader.skipType(tag & 7);
|
|
@@ -5459,10 +5917,8 @@ var OracleList = {
|
|
|
5459
5917
|
},
|
|
5460
5918
|
toJSON(message) {
|
|
5461
5919
|
const obj = {};
|
|
5462
|
-
if (message.oracles) {
|
|
5463
|
-
obj.oracles = message.oracles.map((e) => base64FromBytes(e
|
|
5464
|
-
} else {
|
|
5465
|
-
obj.oracles = [];
|
|
5920
|
+
if (message.oracles?.length) {
|
|
5921
|
+
obj.oracles = message.oracles.map((e) => base64FromBytes(e));
|
|
5466
5922
|
}
|
|
5467
5923
|
return obj;
|
|
5468
5924
|
},
|
|
@@ -5493,13 +5949,13 @@ var ValidatorList = {
|
|
|
5493
5949
|
const tag = reader.uint32();
|
|
5494
5950
|
switch (tag >>> 3) {
|
|
5495
5951
|
case 1:
|
|
5496
|
-
if (tag
|
|
5952
|
+
if (tag !== 10) {
|
|
5497
5953
|
break;
|
|
5498
5954
|
}
|
|
5499
5955
|
message.validators.push(Validator.decode(reader, reader.uint32()));
|
|
5500
5956
|
continue;
|
|
5501
5957
|
}
|
|
5502
|
-
if ((tag & 7)
|
|
5958
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5503
5959
|
break;
|
|
5504
5960
|
}
|
|
5505
5961
|
reader.skipType(tag & 7);
|
|
@@ -5513,10 +5969,8 @@ var ValidatorList = {
|
|
|
5513
5969
|
},
|
|
5514
5970
|
toJSON(message) {
|
|
5515
5971
|
const obj = {};
|
|
5516
|
-
if (message.validators) {
|
|
5517
|
-
obj.validators = message.validators.map((e) =>
|
|
5518
|
-
} else {
|
|
5519
|
-
obj.validators = [];
|
|
5972
|
+
if (message.validators?.length) {
|
|
5973
|
+
obj.validators = message.validators.map((e) => Validator.toJSON(e));
|
|
5520
5974
|
}
|
|
5521
5975
|
return obj;
|
|
5522
5976
|
},
|
|
@@ -5530,7 +5984,7 @@ var ValidatorList = {
|
|
|
5530
5984
|
}
|
|
5531
5985
|
};
|
|
5532
5986
|
function createBaseValidator() {
|
|
5533
|
-
return { address: new Uint8Array(), pubKey: new Uint8Array(), power: 0, name: "", keyIndex: 0 };
|
|
5987
|
+
return { address: new Uint8Array(0), pubKey: new Uint8Array(0), power: 0, name: "", keyIndex: 0 };
|
|
5534
5988
|
}
|
|
5535
5989
|
var Validator = {
|
|
5536
5990
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -5559,37 +6013,37 @@ var Validator = {
|
|
|
5559
6013
|
const tag = reader.uint32();
|
|
5560
6014
|
switch (tag >>> 3) {
|
|
5561
6015
|
case 1:
|
|
5562
|
-
if (tag
|
|
6016
|
+
if (tag !== 10) {
|
|
5563
6017
|
break;
|
|
5564
6018
|
}
|
|
5565
6019
|
message.address = reader.bytes();
|
|
5566
6020
|
continue;
|
|
5567
6021
|
case 2:
|
|
5568
|
-
if (tag
|
|
6022
|
+
if (tag !== 18) {
|
|
5569
6023
|
break;
|
|
5570
6024
|
}
|
|
5571
6025
|
message.pubKey = reader.bytes();
|
|
5572
6026
|
continue;
|
|
5573
6027
|
case 3:
|
|
5574
|
-
if (tag
|
|
6028
|
+
if (tag !== 24) {
|
|
5575
6029
|
break;
|
|
5576
6030
|
}
|
|
5577
6031
|
message.power = longToNumber(reader.uint64());
|
|
5578
6032
|
continue;
|
|
5579
6033
|
case 4:
|
|
5580
|
-
if (tag
|
|
6034
|
+
if (tag !== 34) {
|
|
5581
6035
|
break;
|
|
5582
6036
|
}
|
|
5583
6037
|
message.name = reader.string();
|
|
5584
6038
|
continue;
|
|
5585
6039
|
case 5:
|
|
5586
|
-
if (tag
|
|
6040
|
+
if (tag !== 40) {
|
|
5587
6041
|
break;
|
|
5588
6042
|
}
|
|
5589
6043
|
message.keyIndex = reader.uint32();
|
|
5590
6044
|
continue;
|
|
5591
6045
|
}
|
|
5592
|
-
if ((tag & 7)
|
|
6046
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5593
6047
|
break;
|
|
5594
6048
|
}
|
|
5595
6049
|
reader.skipType(tag & 7);
|
|
@@ -5598,8 +6052,8 @@ var Validator = {
|
|
|
5598
6052
|
},
|
|
5599
6053
|
fromJSON(object) {
|
|
5600
6054
|
return {
|
|
5601
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
|
|
5602
|
-
pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(),
|
|
6055
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
6056
|
+
pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(0),
|
|
5603
6057
|
power: isSet(object.power) ? Number(object.power) : 0,
|
|
5604
6058
|
name: isSet(object.name) ? String(object.name) : "",
|
|
5605
6059
|
keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : 0
|
|
@@ -5607,11 +6061,21 @@ var Validator = {
|
|
|
5607
6061
|
},
|
|
5608
6062
|
toJSON(message) {
|
|
5609
6063
|
const obj = {};
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
message.
|
|
5614
|
-
|
|
6064
|
+
if (message.address.length !== 0) {
|
|
6065
|
+
obj.address = base64FromBytes(message.address);
|
|
6066
|
+
}
|
|
6067
|
+
if (message.pubKey.length !== 0) {
|
|
6068
|
+
obj.pubKey = base64FromBytes(message.pubKey);
|
|
6069
|
+
}
|
|
6070
|
+
if (message.power !== 0) {
|
|
6071
|
+
obj.power = Math.round(message.power);
|
|
6072
|
+
}
|
|
6073
|
+
if (message.name !== "") {
|
|
6074
|
+
obj.name = message.name;
|
|
6075
|
+
}
|
|
6076
|
+
if (message.keyIndex !== 0) {
|
|
6077
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
6078
|
+
}
|
|
5615
6079
|
return obj;
|
|
5616
6080
|
},
|
|
5617
6081
|
create(base) {
|
|
@@ -5619,8 +6083,8 @@ var Validator = {
|
|
|
5619
6083
|
},
|
|
5620
6084
|
fromPartial(object) {
|
|
5621
6085
|
const message = createBaseValidator();
|
|
5622
|
-
message.address = object.address ?? new Uint8Array();
|
|
5623
|
-
message.pubKey = object.pubKey ?? new Uint8Array();
|
|
6086
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
6087
|
+
message.pubKey = object.pubKey ?? new Uint8Array(0);
|
|
5624
6088
|
message.power = object.power ?? 0;
|
|
5625
6089
|
message.name = object.name ?? "";
|
|
5626
6090
|
message.keyIndex = object.keyIndex ?? 0;
|
|
@@ -5632,16 +6096,16 @@ function createBaseTendermintHeader() {
|
|
|
5632
6096
|
chainId: "",
|
|
5633
6097
|
height: 0,
|
|
5634
6098
|
timestamp: 0,
|
|
5635
|
-
blockID: new Uint8Array(),
|
|
5636
|
-
lastCommitHash: new Uint8Array(),
|
|
5637
|
-
dataHash: new Uint8Array(),
|
|
5638
|
-
validatorsHash: new Uint8Array(),
|
|
5639
|
-
nextValidatorsHash: new Uint8Array(),
|
|
5640
|
-
consensusHash: new Uint8Array(),
|
|
5641
|
-
appHash: new Uint8Array(),
|
|
5642
|
-
lastResultsHash: new Uint8Array(),
|
|
5643
|
-
evidenceHash: new Uint8Array(),
|
|
5644
|
-
proposerAddress: new Uint8Array()
|
|
6099
|
+
blockID: new Uint8Array(0),
|
|
6100
|
+
lastCommitHash: new Uint8Array(0),
|
|
6101
|
+
dataHash: new Uint8Array(0),
|
|
6102
|
+
validatorsHash: new Uint8Array(0),
|
|
6103
|
+
nextValidatorsHash: new Uint8Array(0),
|
|
6104
|
+
consensusHash: new Uint8Array(0),
|
|
6105
|
+
appHash: new Uint8Array(0),
|
|
6106
|
+
lastResultsHash: new Uint8Array(0),
|
|
6107
|
+
evidenceHash: new Uint8Array(0),
|
|
6108
|
+
proposerAddress: new Uint8Array(0)
|
|
5645
6109
|
};
|
|
5646
6110
|
}
|
|
5647
6111
|
var TendermintHeader = {
|
|
@@ -5695,85 +6159,85 @@ var TendermintHeader = {
|
|
|
5695
6159
|
const tag = reader.uint32();
|
|
5696
6160
|
switch (tag >>> 3) {
|
|
5697
6161
|
case 2:
|
|
5698
|
-
if (tag
|
|
6162
|
+
if (tag !== 18) {
|
|
5699
6163
|
break;
|
|
5700
6164
|
}
|
|
5701
6165
|
message.chainId = reader.string();
|
|
5702
6166
|
continue;
|
|
5703
6167
|
case 3:
|
|
5704
|
-
if (tag
|
|
6168
|
+
if (tag !== 24) {
|
|
5705
6169
|
break;
|
|
5706
6170
|
}
|
|
5707
6171
|
message.height = longToNumber(reader.int64());
|
|
5708
6172
|
continue;
|
|
5709
6173
|
case 4:
|
|
5710
|
-
if (tag
|
|
6174
|
+
if (tag !== 32) {
|
|
5711
6175
|
break;
|
|
5712
6176
|
}
|
|
5713
6177
|
message.timestamp = longToNumber(reader.int64());
|
|
5714
6178
|
continue;
|
|
5715
6179
|
case 5:
|
|
5716
|
-
if (tag
|
|
6180
|
+
if (tag !== 42) {
|
|
5717
6181
|
break;
|
|
5718
6182
|
}
|
|
5719
6183
|
message.blockID = reader.bytes();
|
|
5720
6184
|
continue;
|
|
5721
6185
|
case 6:
|
|
5722
|
-
if (tag
|
|
6186
|
+
if (tag !== 50) {
|
|
5723
6187
|
break;
|
|
5724
6188
|
}
|
|
5725
6189
|
message.lastCommitHash = reader.bytes();
|
|
5726
6190
|
continue;
|
|
5727
6191
|
case 7:
|
|
5728
|
-
if (tag
|
|
6192
|
+
if (tag !== 58) {
|
|
5729
6193
|
break;
|
|
5730
6194
|
}
|
|
5731
6195
|
message.dataHash = reader.bytes();
|
|
5732
6196
|
continue;
|
|
5733
6197
|
case 8:
|
|
5734
|
-
if (tag
|
|
6198
|
+
if (tag !== 66) {
|
|
5735
6199
|
break;
|
|
5736
6200
|
}
|
|
5737
6201
|
message.validatorsHash = reader.bytes();
|
|
5738
6202
|
continue;
|
|
5739
6203
|
case 9:
|
|
5740
|
-
if (tag
|
|
6204
|
+
if (tag !== 74) {
|
|
5741
6205
|
break;
|
|
5742
6206
|
}
|
|
5743
6207
|
message.nextValidatorsHash = reader.bytes();
|
|
5744
6208
|
continue;
|
|
5745
6209
|
case 10:
|
|
5746
|
-
if (tag
|
|
6210
|
+
if (tag !== 82) {
|
|
5747
6211
|
break;
|
|
5748
6212
|
}
|
|
5749
6213
|
message.consensusHash = reader.bytes();
|
|
5750
6214
|
continue;
|
|
5751
6215
|
case 11:
|
|
5752
|
-
if (tag
|
|
6216
|
+
if (tag !== 90) {
|
|
5753
6217
|
break;
|
|
5754
6218
|
}
|
|
5755
6219
|
message.appHash = reader.bytes();
|
|
5756
6220
|
continue;
|
|
5757
6221
|
case 12:
|
|
5758
|
-
if (tag
|
|
6222
|
+
if (tag !== 98) {
|
|
5759
6223
|
break;
|
|
5760
6224
|
}
|
|
5761
6225
|
message.lastResultsHash = reader.bytes();
|
|
5762
6226
|
continue;
|
|
5763
6227
|
case 13:
|
|
5764
|
-
if (tag
|
|
6228
|
+
if (tag !== 106) {
|
|
5765
6229
|
break;
|
|
5766
6230
|
}
|
|
5767
6231
|
message.evidenceHash = reader.bytes();
|
|
5768
6232
|
continue;
|
|
5769
6233
|
case 14:
|
|
5770
|
-
if (tag
|
|
6234
|
+
if (tag !== 114) {
|
|
5771
6235
|
break;
|
|
5772
6236
|
}
|
|
5773
6237
|
message.proposerAddress = reader.bytes();
|
|
5774
6238
|
continue;
|
|
5775
6239
|
}
|
|
5776
|
-
if ((tag & 7)
|
|
6240
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5777
6241
|
break;
|
|
5778
6242
|
}
|
|
5779
6243
|
reader.skipType(tag & 7);
|
|
@@ -5785,47 +6249,59 @@ var TendermintHeader = {
|
|
|
5785
6249
|
chainId: isSet(object.chainId) ? String(object.chainId) : "",
|
|
5786
6250
|
height: isSet(object.height) ? Number(object.height) : 0,
|
|
5787
6251
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
5788
|
-
blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(),
|
|
5789
|
-
lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(),
|
|
5790
|
-
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(),
|
|
5791
|
-
validatorsHash: isSet(object.validatorsHash) ? bytesFromBase64(object.validatorsHash) : new Uint8Array(),
|
|
5792
|
-
nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array(),
|
|
5793
|
-
consensusHash: isSet(object.consensusHash) ? bytesFromBase64(object.consensusHash) : new Uint8Array(),
|
|
5794
|
-
appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(),
|
|
5795
|
-
lastResultsHash: isSet(object.lastResultsHash) ? bytesFromBase64(object.lastResultsHash) : new Uint8Array(),
|
|
5796
|
-
evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array(),
|
|
5797
|
-
proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array()
|
|
6252
|
+
blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(0),
|
|
6253
|
+
lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(0),
|
|
6254
|
+
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
|
|
6255
|
+
validatorsHash: isSet(object.validatorsHash) ? bytesFromBase64(object.validatorsHash) : new Uint8Array(0),
|
|
6256
|
+
nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array(0),
|
|
6257
|
+
consensusHash: isSet(object.consensusHash) ? bytesFromBase64(object.consensusHash) : new Uint8Array(0),
|
|
6258
|
+
appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(0),
|
|
6259
|
+
lastResultsHash: isSet(object.lastResultsHash) ? bytesFromBase64(object.lastResultsHash) : new Uint8Array(0),
|
|
6260
|
+
evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array(0),
|
|
6261
|
+
proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array(0)
|
|
5798
6262
|
};
|
|
5799
6263
|
},
|
|
5800
6264
|
toJSON(message) {
|
|
5801
6265
|
const obj = {};
|
|
5802
|
-
message.chainId !==
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
)
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
message.
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
message.
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
message.
|
|
5827
|
-
|
|
5828
|
-
|
|
6266
|
+
if (message.chainId !== "") {
|
|
6267
|
+
obj.chainId = message.chainId;
|
|
6268
|
+
}
|
|
6269
|
+
if (message.height !== 0) {
|
|
6270
|
+
obj.height = Math.round(message.height);
|
|
6271
|
+
}
|
|
6272
|
+
if (message.timestamp !== 0) {
|
|
6273
|
+
obj.timestamp = Math.round(message.timestamp);
|
|
6274
|
+
}
|
|
6275
|
+
if (message.blockID.length !== 0) {
|
|
6276
|
+
obj.blockID = base64FromBytes(message.blockID);
|
|
6277
|
+
}
|
|
6278
|
+
if (message.lastCommitHash.length !== 0) {
|
|
6279
|
+
obj.lastCommitHash = base64FromBytes(message.lastCommitHash);
|
|
6280
|
+
}
|
|
6281
|
+
if (message.dataHash.length !== 0) {
|
|
6282
|
+
obj.dataHash = base64FromBytes(message.dataHash);
|
|
6283
|
+
}
|
|
6284
|
+
if (message.validatorsHash.length !== 0) {
|
|
6285
|
+
obj.validatorsHash = base64FromBytes(message.validatorsHash);
|
|
6286
|
+
}
|
|
6287
|
+
if (message.nextValidatorsHash.length !== 0) {
|
|
6288
|
+
obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash);
|
|
6289
|
+
}
|
|
6290
|
+
if (message.consensusHash.length !== 0) {
|
|
6291
|
+
obj.consensusHash = base64FromBytes(message.consensusHash);
|
|
6292
|
+
}
|
|
6293
|
+
if (message.appHash.length !== 0) {
|
|
6294
|
+
obj.appHash = base64FromBytes(message.appHash);
|
|
6295
|
+
}
|
|
6296
|
+
if (message.lastResultsHash.length !== 0) {
|
|
6297
|
+
obj.lastResultsHash = base64FromBytes(message.lastResultsHash);
|
|
6298
|
+
}
|
|
6299
|
+
if (message.evidenceHash.length !== 0) {
|
|
6300
|
+
obj.evidenceHash = base64FromBytes(message.evidenceHash);
|
|
6301
|
+
}
|
|
6302
|
+
if (message.proposerAddress.length !== 0) {
|
|
6303
|
+
obj.proposerAddress = base64FromBytes(message.proposerAddress);
|
|
6304
|
+
}
|
|
5829
6305
|
return obj;
|
|
5830
6306
|
},
|
|
5831
6307
|
create(base) {
|
|
@@ -5836,39 +6312,27 @@ var TendermintHeader = {
|
|
|
5836
6312
|
message.chainId = object.chainId ?? "";
|
|
5837
6313
|
message.height = object.height ?? 0;
|
|
5838
6314
|
message.timestamp = object.timestamp ?? 0;
|
|
5839
|
-
message.blockID = object.blockID ?? new Uint8Array();
|
|
5840
|
-
message.lastCommitHash = object.lastCommitHash ?? new Uint8Array();
|
|
5841
|
-
message.dataHash = object.dataHash ?? new Uint8Array();
|
|
5842
|
-
message.validatorsHash = object.validatorsHash ?? new Uint8Array();
|
|
5843
|
-
message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array();
|
|
5844
|
-
message.consensusHash = object.consensusHash ?? new Uint8Array();
|
|
5845
|
-
message.appHash = object.appHash ?? new Uint8Array();
|
|
5846
|
-
message.lastResultsHash = object.lastResultsHash ?? new Uint8Array();
|
|
5847
|
-
message.evidenceHash = object.evidenceHash ?? new Uint8Array();
|
|
5848
|
-
message.proposerAddress = object.proposerAddress ?? new Uint8Array();
|
|
6315
|
+
message.blockID = object.blockID ?? new Uint8Array(0);
|
|
6316
|
+
message.lastCommitHash = object.lastCommitHash ?? new Uint8Array(0);
|
|
6317
|
+
message.dataHash = object.dataHash ?? new Uint8Array(0);
|
|
6318
|
+
message.validatorsHash = object.validatorsHash ?? new Uint8Array(0);
|
|
6319
|
+
message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(0);
|
|
6320
|
+
message.consensusHash = object.consensusHash ?? new Uint8Array(0);
|
|
6321
|
+
message.appHash = object.appHash ?? new Uint8Array(0);
|
|
6322
|
+
message.lastResultsHash = object.lastResultsHash ?? new Uint8Array(0);
|
|
6323
|
+
message.evidenceHash = object.evidenceHash ?? new Uint8Array(0);
|
|
6324
|
+
message.proposerAddress = object.proposerAddress ?? new Uint8Array(0);
|
|
5849
6325
|
return message;
|
|
5850
6326
|
}
|
|
5851
6327
|
};
|
|
5852
6328
|
function createBaseProcessResult() {
|
|
5853
|
-
return { votes: []
|
|
6329
|
+
return { votes: [] };
|
|
5854
6330
|
}
|
|
5855
6331
|
var ProcessResult = {
|
|
5856
6332
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
5857
6333
|
for (const v of message.votes) {
|
|
5858
6334
|
QuestionResult.encode(v, writer.uint32(10).fork()).ldelim();
|
|
5859
6335
|
}
|
|
5860
|
-
if (message.processId !== void 0) {
|
|
5861
|
-
writer.uint32(18).bytes(message.processId);
|
|
5862
|
-
}
|
|
5863
|
-
if (message.entityId !== void 0) {
|
|
5864
|
-
writer.uint32(26).bytes(message.entityId);
|
|
5865
|
-
}
|
|
5866
|
-
if (message.oracleAddress !== void 0) {
|
|
5867
|
-
writer.uint32(34).bytes(message.oracleAddress);
|
|
5868
|
-
}
|
|
5869
|
-
if (message.signature !== void 0) {
|
|
5870
|
-
writer.uint32(42).bytes(message.signature);
|
|
5871
|
-
}
|
|
5872
6336
|
return writer;
|
|
5873
6337
|
},
|
|
5874
6338
|
decode(input, length) {
|
|
@@ -5879,37 +6343,13 @@ var ProcessResult = {
|
|
|
5879
6343
|
const tag = reader.uint32();
|
|
5880
6344
|
switch (tag >>> 3) {
|
|
5881
6345
|
case 1:
|
|
5882
|
-
if (tag
|
|
6346
|
+
if (tag !== 10) {
|
|
5883
6347
|
break;
|
|
5884
6348
|
}
|
|
5885
6349
|
message.votes.push(QuestionResult.decode(reader, reader.uint32()));
|
|
5886
6350
|
continue;
|
|
5887
|
-
case 2:
|
|
5888
|
-
if (tag != 18) {
|
|
5889
|
-
break;
|
|
5890
|
-
}
|
|
5891
|
-
message.processId = reader.bytes();
|
|
5892
|
-
continue;
|
|
5893
|
-
case 3:
|
|
5894
|
-
if (tag != 26) {
|
|
5895
|
-
break;
|
|
5896
|
-
}
|
|
5897
|
-
message.entityId = reader.bytes();
|
|
5898
|
-
continue;
|
|
5899
|
-
case 4:
|
|
5900
|
-
if (tag != 34) {
|
|
5901
|
-
break;
|
|
5902
|
-
}
|
|
5903
|
-
message.oracleAddress = reader.bytes();
|
|
5904
|
-
continue;
|
|
5905
|
-
case 5:
|
|
5906
|
-
if (tag != 42) {
|
|
5907
|
-
break;
|
|
5908
|
-
}
|
|
5909
|
-
message.signature = reader.bytes();
|
|
5910
|
-
continue;
|
|
5911
6351
|
}
|
|
5912
|
-
if ((tag & 7)
|
|
6352
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5913
6353
|
break;
|
|
5914
6354
|
}
|
|
5915
6355
|
reader.skipType(tag & 7);
|
|
@@ -5917,25 +6357,13 @@ var ProcessResult = {
|
|
|
5917
6357
|
return message;
|
|
5918
6358
|
},
|
|
5919
6359
|
fromJSON(object) {
|
|
5920
|
-
return {
|
|
5921
|
-
votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [],
|
|
5922
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : void 0,
|
|
5923
|
-
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : void 0,
|
|
5924
|
-
oracleAddress: isSet(object.oracleAddress) ? bytesFromBase64(object.oracleAddress) : void 0,
|
|
5925
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : void 0
|
|
5926
|
-
};
|
|
6360
|
+
return { votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [] };
|
|
5927
6361
|
},
|
|
5928
6362
|
toJSON(message) {
|
|
5929
6363
|
const obj = {};
|
|
5930
|
-
if (message.votes) {
|
|
5931
|
-
obj.votes = message.votes.map((e) =>
|
|
5932
|
-
}
|
|
5933
|
-
obj.votes = [];
|
|
5934
|
-
}
|
|
5935
|
-
message.processId !== void 0 && (obj.processId = message.processId !== void 0 ? base64FromBytes(message.processId) : void 0);
|
|
5936
|
-
message.entityId !== void 0 && (obj.entityId = message.entityId !== void 0 ? base64FromBytes(message.entityId) : void 0);
|
|
5937
|
-
message.oracleAddress !== void 0 && (obj.oracleAddress = message.oracleAddress !== void 0 ? base64FromBytes(message.oracleAddress) : void 0);
|
|
5938
|
-
message.signature !== void 0 && (obj.signature = message.signature !== void 0 ? base64FromBytes(message.signature) : void 0);
|
|
6364
|
+
if (message.votes?.length) {
|
|
6365
|
+
obj.votes = message.votes.map((e) => QuestionResult.toJSON(e));
|
|
6366
|
+
}
|
|
5939
6367
|
return obj;
|
|
5940
6368
|
},
|
|
5941
6369
|
create(base) {
|
|
@@ -5944,10 +6372,6 @@ var ProcessResult = {
|
|
|
5944
6372
|
fromPartial(object) {
|
|
5945
6373
|
const message = createBaseProcessResult();
|
|
5946
6374
|
message.votes = object.votes?.map((e) => QuestionResult.fromPartial(e)) || [];
|
|
5947
|
-
message.processId = object.processId ?? void 0;
|
|
5948
|
-
message.entityId = object.entityId ?? void 0;
|
|
5949
|
-
message.oracleAddress = object.oracleAddress ?? void 0;
|
|
5950
|
-
message.signature = object.signature ?? void 0;
|
|
5951
6375
|
return message;
|
|
5952
6376
|
}
|
|
5953
6377
|
};
|
|
@@ -5969,13 +6393,13 @@ var QuestionResult = {
|
|
|
5969
6393
|
const tag = reader.uint32();
|
|
5970
6394
|
switch (tag >>> 3) {
|
|
5971
6395
|
case 1:
|
|
5972
|
-
if (tag
|
|
6396
|
+
if (tag !== 10) {
|
|
5973
6397
|
break;
|
|
5974
6398
|
}
|
|
5975
6399
|
message.question.push(reader.bytes());
|
|
5976
6400
|
continue;
|
|
5977
6401
|
}
|
|
5978
|
-
if ((tag & 7)
|
|
6402
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5979
6403
|
break;
|
|
5980
6404
|
}
|
|
5981
6405
|
reader.skipType(tag & 7);
|
|
@@ -5987,10 +6411,8 @@ var QuestionResult = {
|
|
|
5987
6411
|
},
|
|
5988
6412
|
toJSON(message) {
|
|
5989
6413
|
const obj = {};
|
|
5990
|
-
if (message.question) {
|
|
5991
|
-
obj.question = message.question.map((e) => base64FromBytes(e
|
|
5992
|
-
} else {
|
|
5993
|
-
obj.question = [];
|
|
6414
|
+
if (message.question?.length) {
|
|
6415
|
+
obj.question = message.question.map((e) => base64FromBytes(e));
|
|
5994
6416
|
}
|
|
5995
6417
|
return obj;
|
|
5996
6418
|
},
|
|
@@ -6021,13 +6443,13 @@ var ProcessEndingList = {
|
|
|
6021
6443
|
const tag = reader.uint32();
|
|
6022
6444
|
switch (tag >>> 3) {
|
|
6023
6445
|
case 1:
|
|
6024
|
-
if (tag
|
|
6446
|
+
if (tag !== 10) {
|
|
6025
6447
|
break;
|
|
6026
6448
|
}
|
|
6027
6449
|
message.processList.push(reader.bytes());
|
|
6028
6450
|
continue;
|
|
6029
6451
|
}
|
|
6030
|
-
if ((tag & 7)
|
|
6452
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6031
6453
|
break;
|
|
6032
6454
|
}
|
|
6033
6455
|
reader.skipType(tag & 7);
|
|
@@ -6041,10 +6463,8 @@ var ProcessEndingList = {
|
|
|
6041
6463
|
},
|
|
6042
6464
|
toJSON(message) {
|
|
6043
6465
|
const obj = {};
|
|
6044
|
-
if (message.processList) {
|
|
6045
|
-
obj.processList = message.processList.map((e) => base64FromBytes(e
|
|
6046
|
-
} else {
|
|
6047
|
-
obj.processList = [];
|
|
6466
|
+
if (message.processList?.length) {
|
|
6467
|
+
obj.processList = message.processList.map((e) => base64FromBytes(e));
|
|
6048
6468
|
}
|
|
6049
6469
|
return obj;
|
|
6050
6470
|
},
|
|
@@ -6075,13 +6495,13 @@ var StoredKeys = {
|
|
|
6075
6495
|
const tag = reader.uint32();
|
|
6076
6496
|
switch (tag >>> 3) {
|
|
6077
6497
|
case 1:
|
|
6078
|
-
if (tag
|
|
6498
|
+
if (tag !== 10) {
|
|
6079
6499
|
break;
|
|
6080
6500
|
}
|
|
6081
6501
|
message.pids.push(reader.bytes());
|
|
6082
6502
|
continue;
|
|
6083
6503
|
}
|
|
6084
|
-
if ((tag & 7)
|
|
6504
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6085
6505
|
break;
|
|
6086
6506
|
}
|
|
6087
6507
|
reader.skipType(tag & 7);
|
|
@@ -6093,10 +6513,8 @@ var StoredKeys = {
|
|
|
6093
6513
|
},
|
|
6094
6514
|
toJSON(message) {
|
|
6095
6515
|
const obj = {};
|
|
6096
|
-
if (message.pids) {
|
|
6097
|
-
obj.pids = message.pids.map((e) => base64FromBytes(e
|
|
6098
|
-
} else {
|
|
6099
|
-
obj.pids = [];
|
|
6516
|
+
if (message.pids?.length) {
|
|
6517
|
+
obj.pids = message.pids.map((e) => base64FromBytes(e));
|
|
6100
6518
|
}
|
|
6101
6519
|
return obj;
|
|
6102
6520
|
},
|
|
@@ -6195,12 +6613,14 @@ function isSet(value) {
|
|
|
6195
6613
|
ProofZkSNARK,
|
|
6196
6614
|
QuestionResult,
|
|
6197
6615
|
RegisterKeyTx,
|
|
6616
|
+
RegisterSIKTx,
|
|
6198
6617
|
SendTokensTx,
|
|
6199
6618
|
SetAccountTx,
|
|
6200
6619
|
SetKeykeeperTx,
|
|
6201
6620
|
SetProcessTx,
|
|
6202
6621
|
SetTransactionCostsTx,
|
|
6203
6622
|
SignedTx,
|
|
6623
|
+
SikTx,
|
|
6204
6624
|
SourceNetworkId,
|
|
6205
6625
|
StoredKeys,
|
|
6206
6626
|
TendermintHeader,
|