@vocdoni/proto 1.14.4 → 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/.idea/dvote-protobuf.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- 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.mjs
CHANGED
|
@@ -1441,6 +1441,8 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
|
|
|
1441
1441
|
TxType2[TxType2["ADD_KEYKEEPER"] = 21] = "ADD_KEYKEEPER";
|
|
1442
1442
|
TxType2[TxType2["DELETE_KEYKEEPER"] = 22] = "DELETE_KEYKEEPER";
|
|
1443
1443
|
TxType2[TxType2["CREATE_ACCOUNT"] = 23] = "CREATE_ACCOUNT";
|
|
1444
|
+
TxType2[TxType2["SET_ACCOUNT_SIK"] = 24] = "SET_ACCOUNT_SIK";
|
|
1445
|
+
TxType2[TxType2["DEL_ACCOUNT_SIK"] = 25] = "DEL_ACCOUNT_SIK";
|
|
1444
1446
|
TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1445
1447
|
return TxType2;
|
|
1446
1448
|
})(TxType || {});
|
|
@@ -1518,6 +1520,12 @@ function txTypeFromJSON(object) {
|
|
|
1518
1520
|
case 23:
|
|
1519
1521
|
case "CREATE_ACCOUNT":
|
|
1520
1522
|
return 23 /* CREATE_ACCOUNT */;
|
|
1523
|
+
case 24:
|
|
1524
|
+
case "SET_ACCOUNT_SIK":
|
|
1525
|
+
return 24 /* SET_ACCOUNT_SIK */;
|
|
1526
|
+
case 25:
|
|
1527
|
+
case "DEL_ACCOUNT_SIK":
|
|
1528
|
+
return 25 /* DEL_ACCOUNT_SIK */;
|
|
1521
1529
|
case -1:
|
|
1522
1530
|
case "UNRECOGNIZED":
|
|
1523
1531
|
default:
|
|
@@ -1574,6 +1582,10 @@ function txTypeToJSON(object) {
|
|
|
1574
1582
|
return "DELETE_KEYKEEPER";
|
|
1575
1583
|
case 23 /* CREATE_ACCOUNT */:
|
|
1576
1584
|
return "CREATE_ACCOUNT";
|
|
1585
|
+
case 24 /* SET_ACCOUNT_SIK */:
|
|
1586
|
+
return "SET_ACCOUNT_SIK";
|
|
1587
|
+
case 25 /* DEL_ACCOUNT_SIK */:
|
|
1588
|
+
return "DEL_ACCOUNT_SIK";
|
|
1577
1589
|
case -1 /* UNRECOGNIZED */:
|
|
1578
1590
|
default:
|
|
1579
1591
|
return "UNRECOGNIZED";
|
|
@@ -1996,11 +2008,11 @@ function proofArbo_KeyTypeToJSON(object) {
|
|
|
1996
2008
|
}
|
|
1997
2009
|
function createBaseVoteEnvelope() {
|
|
1998
2010
|
return {
|
|
1999
|
-
nonce: new Uint8Array(),
|
|
2000
|
-
processId: new Uint8Array(),
|
|
2011
|
+
nonce: new Uint8Array(0),
|
|
2012
|
+
processId: new Uint8Array(0),
|
|
2001
2013
|
proof: void 0,
|
|
2002
|
-
votePackage: new Uint8Array(),
|
|
2003
|
-
nullifier: new Uint8Array(),
|
|
2014
|
+
votePackage: new Uint8Array(0),
|
|
2015
|
+
nullifier: new Uint8Array(0),
|
|
2004
2016
|
encryptionKeyIndexes: []
|
|
2005
2017
|
};
|
|
2006
2018
|
}
|
|
@@ -2036,41 +2048,41 @@ var VoteEnvelope = {
|
|
|
2036
2048
|
const tag = reader.uint32();
|
|
2037
2049
|
switch (tag >>> 3) {
|
|
2038
2050
|
case 1:
|
|
2039
|
-
if (tag
|
|
2051
|
+
if (tag !== 10) {
|
|
2040
2052
|
break;
|
|
2041
2053
|
}
|
|
2042
2054
|
message.nonce = reader.bytes();
|
|
2043
2055
|
continue;
|
|
2044
2056
|
case 2:
|
|
2045
|
-
if (tag
|
|
2057
|
+
if (tag !== 18) {
|
|
2046
2058
|
break;
|
|
2047
2059
|
}
|
|
2048
2060
|
message.processId = reader.bytes();
|
|
2049
2061
|
continue;
|
|
2050
2062
|
case 3:
|
|
2051
|
-
if (tag
|
|
2063
|
+
if (tag !== 26) {
|
|
2052
2064
|
break;
|
|
2053
2065
|
}
|
|
2054
2066
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
2055
2067
|
continue;
|
|
2056
2068
|
case 4:
|
|
2057
|
-
if (tag
|
|
2069
|
+
if (tag !== 34) {
|
|
2058
2070
|
break;
|
|
2059
2071
|
}
|
|
2060
2072
|
message.votePackage = reader.bytes();
|
|
2061
2073
|
continue;
|
|
2062
2074
|
case 5:
|
|
2063
|
-
if (tag
|
|
2075
|
+
if (tag !== 42) {
|
|
2064
2076
|
break;
|
|
2065
2077
|
}
|
|
2066
2078
|
message.nullifier = reader.bytes();
|
|
2067
2079
|
continue;
|
|
2068
2080
|
case 6:
|
|
2069
|
-
if (tag
|
|
2081
|
+
if (tag === 48) {
|
|
2070
2082
|
message.encryptionKeyIndexes.push(reader.uint32());
|
|
2071
2083
|
continue;
|
|
2072
2084
|
}
|
|
2073
|
-
if (tag
|
|
2085
|
+
if (tag === 50) {
|
|
2074
2086
|
const end2 = reader.uint32() + reader.pos;
|
|
2075
2087
|
while (reader.pos < end2) {
|
|
2076
2088
|
message.encryptionKeyIndexes.push(reader.uint32());
|
|
@@ -2079,7 +2091,7 @@ var VoteEnvelope = {
|
|
|
2079
2091
|
}
|
|
2080
2092
|
break;
|
|
2081
2093
|
}
|
|
2082
|
-
if ((tag & 7)
|
|
2094
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2083
2095
|
break;
|
|
2084
2096
|
}
|
|
2085
2097
|
reader.skipType(tag & 7);
|
|
@@ -2088,25 +2100,33 @@ var VoteEnvelope = {
|
|
|
2088
2100
|
},
|
|
2089
2101
|
fromJSON(object) {
|
|
2090
2102
|
return {
|
|
2091
|
-
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(),
|
|
2092
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
2103
|
+
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(0),
|
|
2104
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
2093
2105
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
2094
|
-
votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(),
|
|
2095
|
-
nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(),
|
|
2106
|
+
votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(0),
|
|
2107
|
+
nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(0),
|
|
2096
2108
|
encryptionKeyIndexes: Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => Number(e)) : []
|
|
2097
2109
|
};
|
|
2098
2110
|
},
|
|
2099
2111
|
toJSON(message) {
|
|
2100
2112
|
const obj = {};
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2113
|
+
if (message.nonce.length !== 0) {
|
|
2114
|
+
obj.nonce = base64FromBytes(message.nonce);
|
|
2115
|
+
}
|
|
2116
|
+
if (message.processId.length !== 0) {
|
|
2117
|
+
obj.processId = base64FromBytes(message.processId);
|
|
2118
|
+
}
|
|
2119
|
+
if (message.proof !== void 0) {
|
|
2120
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
2121
|
+
}
|
|
2122
|
+
if (message.votePackage.length !== 0) {
|
|
2123
|
+
obj.votePackage = base64FromBytes(message.votePackage);
|
|
2124
|
+
}
|
|
2125
|
+
if (message.nullifier.length !== 0) {
|
|
2126
|
+
obj.nullifier = base64FromBytes(message.nullifier);
|
|
2127
|
+
}
|
|
2128
|
+
if (message.encryptionKeyIndexes?.length) {
|
|
2107
2129
|
obj.encryptionKeyIndexes = message.encryptionKeyIndexes.map((e) => Math.round(e));
|
|
2108
|
-
} else {
|
|
2109
|
-
obj.encryptionKeyIndexes = [];
|
|
2110
2130
|
}
|
|
2111
2131
|
return obj;
|
|
2112
2132
|
},
|
|
@@ -2115,11 +2135,11 @@ var VoteEnvelope = {
|
|
|
2115
2135
|
},
|
|
2116
2136
|
fromPartial(object) {
|
|
2117
2137
|
const message = createBaseVoteEnvelope();
|
|
2118
|
-
message.nonce = object.nonce ?? new Uint8Array();
|
|
2119
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
2138
|
+
message.nonce = object.nonce ?? new Uint8Array(0);
|
|
2139
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
2120
2140
|
message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
|
|
2121
|
-
message.votePackage = object.votePackage ?? new Uint8Array();
|
|
2122
|
-
message.nullifier = object.nullifier ?? new Uint8Array();
|
|
2141
|
+
message.votePackage = object.votePackage ?? new Uint8Array(0);
|
|
2142
|
+
message.nullifier = object.nullifier ?? new Uint8Array(0);
|
|
2123
2143
|
message.encryptionKeyIndexes = object.encryptionKeyIndexes?.map((e) => e) || [];
|
|
2124
2144
|
return message;
|
|
2125
2145
|
}
|
|
@@ -2139,7 +2159,7 @@ var Census = {
|
|
|
2139
2159
|
const tag = reader.uint32();
|
|
2140
2160
|
switch (tag >>> 3) {
|
|
2141
2161
|
}
|
|
2142
|
-
if ((tag & 7)
|
|
2162
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2143
2163
|
break;
|
|
2144
2164
|
}
|
|
2145
2165
|
reader.skipType(tag & 7);
|
|
@@ -2202,19 +2222,19 @@ var Proof = {
|
|
|
2202
2222
|
const tag = reader.uint32();
|
|
2203
2223
|
switch (tag >>> 3) {
|
|
2204
2224
|
case 1:
|
|
2205
|
-
if (tag
|
|
2225
|
+
if (tag !== 10) {
|
|
2206
2226
|
break;
|
|
2207
2227
|
}
|
|
2208
2228
|
message.payload = { $case: "graviton", graviton: ProofGraviton.decode(reader, reader.uint32()) };
|
|
2209
2229
|
continue;
|
|
2210
2230
|
case 2:
|
|
2211
|
-
if (tag
|
|
2231
|
+
if (tag !== 18) {
|
|
2212
2232
|
break;
|
|
2213
2233
|
}
|
|
2214
2234
|
message.payload = { $case: "iden3", iden3: ProofIden3.decode(reader, reader.uint32()) };
|
|
2215
2235
|
continue;
|
|
2216
2236
|
case 3:
|
|
2217
|
-
if (tag
|
|
2237
|
+
if (tag !== 26) {
|
|
2218
2238
|
break;
|
|
2219
2239
|
}
|
|
2220
2240
|
message.payload = {
|
|
@@ -2223,7 +2243,7 @@ var Proof = {
|
|
|
2223
2243
|
};
|
|
2224
2244
|
continue;
|
|
2225
2245
|
case 4:
|
|
2226
|
-
if (tag
|
|
2246
|
+
if (tag !== 34) {
|
|
2227
2247
|
break;
|
|
2228
2248
|
}
|
|
2229
2249
|
message.payload = {
|
|
@@ -2232,31 +2252,31 @@ var Proof = {
|
|
|
2232
2252
|
};
|
|
2233
2253
|
continue;
|
|
2234
2254
|
case 5:
|
|
2235
|
-
if (tag
|
|
2255
|
+
if (tag !== 42) {
|
|
2236
2256
|
break;
|
|
2237
2257
|
}
|
|
2238
2258
|
message.payload = { $case: "ca", ca: ProofCA.decode(reader, reader.uint32()) };
|
|
2239
2259
|
continue;
|
|
2240
2260
|
case 6:
|
|
2241
|
-
if (tag
|
|
2261
|
+
if (tag !== 50) {
|
|
2242
2262
|
break;
|
|
2243
2263
|
}
|
|
2244
2264
|
message.payload = { $case: "arbo", arbo: ProofArbo.decode(reader, reader.uint32()) };
|
|
2245
2265
|
continue;
|
|
2246
2266
|
case 7:
|
|
2247
|
-
if (tag
|
|
2267
|
+
if (tag !== 58) {
|
|
2248
2268
|
break;
|
|
2249
2269
|
}
|
|
2250
2270
|
message.payload = { $case: "zkSnark", zkSnark: ProofZkSNARK.decode(reader, reader.uint32()) };
|
|
2251
2271
|
continue;
|
|
2252
2272
|
case 8:
|
|
2253
|
-
if (tag
|
|
2273
|
+
if (tag !== 66) {
|
|
2254
2274
|
break;
|
|
2255
2275
|
}
|
|
2256
2276
|
message.payload = { $case: "minimeStorage", minimeStorage: ProofMinime.decode(reader, reader.uint32()) };
|
|
2257
2277
|
continue;
|
|
2258
2278
|
}
|
|
2259
|
-
if ((tag & 7)
|
|
2279
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2260
2280
|
break;
|
|
2261
2281
|
}
|
|
2262
2282
|
reader.skipType(tag & 7);
|
|
@@ -2270,14 +2290,30 @@ var Proof = {
|
|
|
2270
2290
|
},
|
|
2271
2291
|
toJSON(message) {
|
|
2272
2292
|
const obj = {};
|
|
2273
|
-
message.payload?.$case === "graviton"
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
message.payload?.$case === "
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
message.payload?.$case === "
|
|
2280
|
-
|
|
2293
|
+
if (message.payload?.$case === "graviton") {
|
|
2294
|
+
obj.graviton = ProofGraviton.toJSON(message.payload.graviton);
|
|
2295
|
+
}
|
|
2296
|
+
if (message.payload?.$case === "iden3") {
|
|
2297
|
+
obj.iden3 = ProofIden3.toJSON(message.payload.iden3);
|
|
2298
|
+
}
|
|
2299
|
+
if (message.payload?.$case === "ethereumStorage") {
|
|
2300
|
+
obj.ethereumStorage = ProofEthereumStorage.toJSON(message.payload.ethereumStorage);
|
|
2301
|
+
}
|
|
2302
|
+
if (message.payload?.$case === "ethereumAccount") {
|
|
2303
|
+
obj.ethereumAccount = ProofEthereumAccount.toJSON(message.payload.ethereumAccount);
|
|
2304
|
+
}
|
|
2305
|
+
if (message.payload?.$case === "ca") {
|
|
2306
|
+
obj.ca = ProofCA.toJSON(message.payload.ca);
|
|
2307
|
+
}
|
|
2308
|
+
if (message.payload?.$case === "arbo") {
|
|
2309
|
+
obj.arbo = ProofArbo.toJSON(message.payload.arbo);
|
|
2310
|
+
}
|
|
2311
|
+
if (message.payload?.$case === "zkSnark") {
|
|
2312
|
+
obj.zkSnark = ProofZkSNARK.toJSON(message.payload.zkSnark);
|
|
2313
|
+
}
|
|
2314
|
+
if (message.payload?.$case === "minimeStorage") {
|
|
2315
|
+
obj.minimeStorage = ProofMinime.toJSON(message.payload.minimeStorage);
|
|
2316
|
+
}
|
|
2281
2317
|
return obj;
|
|
2282
2318
|
},
|
|
2283
2319
|
create(base) {
|
|
@@ -2322,7 +2358,7 @@ var Proof = {
|
|
|
2322
2358
|
}
|
|
2323
2359
|
};
|
|
2324
2360
|
function createBaseProofGraviton() {
|
|
2325
|
-
return { siblings: new Uint8Array() };
|
|
2361
|
+
return { siblings: new Uint8Array(0) };
|
|
2326
2362
|
}
|
|
2327
2363
|
var ProofGraviton = {
|
|
2328
2364
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2339,13 +2375,13 @@ var ProofGraviton = {
|
|
|
2339
2375
|
const tag = reader.uint32();
|
|
2340
2376
|
switch (tag >>> 3) {
|
|
2341
2377
|
case 1:
|
|
2342
|
-
if (tag
|
|
2378
|
+
if (tag !== 10) {
|
|
2343
2379
|
break;
|
|
2344
2380
|
}
|
|
2345
2381
|
message.siblings = reader.bytes();
|
|
2346
2382
|
continue;
|
|
2347
2383
|
}
|
|
2348
|
-
if ((tag & 7)
|
|
2384
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2349
2385
|
break;
|
|
2350
2386
|
}
|
|
2351
2387
|
reader.skipType(tag & 7);
|
|
@@ -2353,11 +2389,13 @@ var ProofGraviton = {
|
|
|
2353
2389
|
return message;
|
|
2354
2390
|
},
|
|
2355
2391
|
fromJSON(object) {
|
|
2356
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array() };
|
|
2392
|
+
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2357
2393
|
},
|
|
2358
2394
|
toJSON(message) {
|
|
2359
2395
|
const obj = {};
|
|
2360
|
-
|
|
2396
|
+
if (message.siblings.length !== 0) {
|
|
2397
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
2398
|
+
}
|
|
2361
2399
|
return obj;
|
|
2362
2400
|
},
|
|
2363
2401
|
create(base) {
|
|
@@ -2365,12 +2403,12 @@ var ProofGraviton = {
|
|
|
2365
2403
|
},
|
|
2366
2404
|
fromPartial(object) {
|
|
2367
2405
|
const message = createBaseProofGraviton();
|
|
2368
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2406
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2369
2407
|
return message;
|
|
2370
2408
|
}
|
|
2371
2409
|
};
|
|
2372
2410
|
function createBaseProofIden3() {
|
|
2373
|
-
return { siblings: new Uint8Array() };
|
|
2411
|
+
return { siblings: new Uint8Array(0) };
|
|
2374
2412
|
}
|
|
2375
2413
|
var ProofIden3 = {
|
|
2376
2414
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2387,13 +2425,13 @@ var ProofIden3 = {
|
|
|
2387
2425
|
const tag = reader.uint32();
|
|
2388
2426
|
switch (tag >>> 3) {
|
|
2389
2427
|
case 1:
|
|
2390
|
-
if (tag
|
|
2428
|
+
if (tag !== 10) {
|
|
2391
2429
|
break;
|
|
2392
2430
|
}
|
|
2393
2431
|
message.siblings = reader.bytes();
|
|
2394
2432
|
continue;
|
|
2395
2433
|
}
|
|
2396
|
-
if ((tag & 7)
|
|
2434
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2397
2435
|
break;
|
|
2398
2436
|
}
|
|
2399
2437
|
reader.skipType(tag & 7);
|
|
@@ -2401,11 +2439,13 @@ var ProofIden3 = {
|
|
|
2401
2439
|
return message;
|
|
2402
2440
|
},
|
|
2403
2441
|
fromJSON(object) {
|
|
2404
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array() };
|
|
2442
|
+
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2405
2443
|
},
|
|
2406
2444
|
toJSON(message) {
|
|
2407
2445
|
const obj = {};
|
|
2408
|
-
|
|
2446
|
+
if (message.siblings.length !== 0) {
|
|
2447
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
2448
|
+
}
|
|
2409
2449
|
return obj;
|
|
2410
2450
|
},
|
|
2411
2451
|
create(base) {
|
|
@@ -2413,12 +2453,12 @@ var ProofIden3 = {
|
|
|
2413
2453
|
},
|
|
2414
2454
|
fromPartial(object) {
|
|
2415
2455
|
const message = createBaseProofIden3();
|
|
2416
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2456
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2417
2457
|
return message;
|
|
2418
2458
|
}
|
|
2419
2459
|
};
|
|
2420
2460
|
function createBaseProofEthereumStorage() {
|
|
2421
|
-
return { key: new Uint8Array(), value: new Uint8Array(), siblings: [] };
|
|
2461
|
+
return { key: new Uint8Array(0), value: new Uint8Array(0), siblings: [] };
|
|
2422
2462
|
}
|
|
2423
2463
|
var ProofEthereumStorage = {
|
|
2424
2464
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2441,25 +2481,25 @@ var ProofEthereumStorage = {
|
|
|
2441
2481
|
const tag = reader.uint32();
|
|
2442
2482
|
switch (tag >>> 3) {
|
|
2443
2483
|
case 1:
|
|
2444
|
-
if (tag
|
|
2484
|
+
if (tag !== 10) {
|
|
2445
2485
|
break;
|
|
2446
2486
|
}
|
|
2447
2487
|
message.key = reader.bytes();
|
|
2448
2488
|
continue;
|
|
2449
2489
|
case 2:
|
|
2450
|
-
if (tag
|
|
2490
|
+
if (tag !== 18) {
|
|
2451
2491
|
break;
|
|
2452
2492
|
}
|
|
2453
2493
|
message.value = reader.bytes();
|
|
2454
2494
|
continue;
|
|
2455
2495
|
case 3:
|
|
2456
|
-
if (tag
|
|
2496
|
+
if (tag !== 26) {
|
|
2457
2497
|
break;
|
|
2458
2498
|
}
|
|
2459
2499
|
message.siblings.push(reader.bytes());
|
|
2460
2500
|
continue;
|
|
2461
2501
|
}
|
|
2462
|
-
if ((tag & 7)
|
|
2502
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2463
2503
|
break;
|
|
2464
2504
|
}
|
|
2465
2505
|
reader.skipType(tag & 7);
|
|
@@ -2468,19 +2508,21 @@ var ProofEthereumStorage = {
|
|
|
2468
2508
|
},
|
|
2469
2509
|
fromJSON(object) {
|
|
2470
2510
|
return {
|
|
2471
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
|
2472
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
|
|
2511
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
2512
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
2473
2513
|
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2474
2514
|
};
|
|
2475
2515
|
},
|
|
2476
2516
|
toJSON(message) {
|
|
2477
2517
|
const obj = {};
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2518
|
+
if (message.key.length !== 0) {
|
|
2519
|
+
obj.key = base64FromBytes(message.key);
|
|
2520
|
+
}
|
|
2521
|
+
if (message.value.length !== 0) {
|
|
2522
|
+
obj.value = base64FromBytes(message.value);
|
|
2523
|
+
}
|
|
2524
|
+
if (message.siblings?.length) {
|
|
2525
|
+
obj.siblings = message.siblings.map((e) => base64FromBytes(e));
|
|
2484
2526
|
}
|
|
2485
2527
|
return obj;
|
|
2486
2528
|
},
|
|
@@ -2489,18 +2531,18 @@ var ProofEthereumStorage = {
|
|
|
2489
2531
|
},
|
|
2490
2532
|
fromPartial(object) {
|
|
2491
2533
|
const message = createBaseProofEthereumStorage();
|
|
2492
|
-
message.key = object.key ?? new Uint8Array();
|
|
2493
|
-
message.value = object.value ?? new Uint8Array();
|
|
2534
|
+
message.key = object.key ?? new Uint8Array(0);
|
|
2535
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
2494
2536
|
message.siblings = object.siblings?.map((e) => e) || [];
|
|
2495
2537
|
return message;
|
|
2496
2538
|
}
|
|
2497
2539
|
};
|
|
2498
2540
|
function createBaseProofEthereumAccount() {
|
|
2499
2541
|
return {
|
|
2500
|
-
nonce: new Uint8Array(),
|
|
2501
|
-
balance: new Uint8Array(),
|
|
2502
|
-
storageHash: new Uint8Array(),
|
|
2503
|
-
codeHash: new Uint8Array(),
|
|
2542
|
+
nonce: new Uint8Array(0),
|
|
2543
|
+
balance: new Uint8Array(0),
|
|
2544
|
+
storageHash: new Uint8Array(0),
|
|
2545
|
+
codeHash: new Uint8Array(0),
|
|
2504
2546
|
siblings: []
|
|
2505
2547
|
};
|
|
2506
2548
|
}
|
|
@@ -2531,37 +2573,37 @@ var ProofEthereumAccount = {
|
|
|
2531
2573
|
const tag = reader.uint32();
|
|
2532
2574
|
switch (tag >>> 3) {
|
|
2533
2575
|
case 1:
|
|
2534
|
-
if (tag
|
|
2576
|
+
if (tag !== 10) {
|
|
2535
2577
|
break;
|
|
2536
2578
|
}
|
|
2537
2579
|
message.nonce = reader.bytes();
|
|
2538
2580
|
continue;
|
|
2539
2581
|
case 2:
|
|
2540
|
-
if (tag
|
|
2582
|
+
if (tag !== 18) {
|
|
2541
2583
|
break;
|
|
2542
2584
|
}
|
|
2543
2585
|
message.balance = reader.bytes();
|
|
2544
2586
|
continue;
|
|
2545
2587
|
case 3:
|
|
2546
|
-
if (tag
|
|
2588
|
+
if (tag !== 26) {
|
|
2547
2589
|
break;
|
|
2548
2590
|
}
|
|
2549
2591
|
message.storageHash = reader.bytes();
|
|
2550
2592
|
continue;
|
|
2551
2593
|
case 4:
|
|
2552
|
-
if (tag
|
|
2594
|
+
if (tag !== 34) {
|
|
2553
2595
|
break;
|
|
2554
2596
|
}
|
|
2555
2597
|
message.codeHash = reader.bytes();
|
|
2556
2598
|
continue;
|
|
2557
2599
|
case 5:
|
|
2558
|
-
if (tag
|
|
2600
|
+
if (tag !== 42) {
|
|
2559
2601
|
break;
|
|
2560
2602
|
}
|
|
2561
2603
|
message.siblings.push(reader.bytes());
|
|
2562
2604
|
continue;
|
|
2563
2605
|
}
|
|
2564
|
-
if ((tag & 7)
|
|
2606
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2565
2607
|
break;
|
|
2566
2608
|
}
|
|
2567
2609
|
reader.skipType(tag & 7);
|
|
@@ -2570,23 +2612,29 @@ var ProofEthereumAccount = {
|
|
|
2570
2612
|
},
|
|
2571
2613
|
fromJSON(object) {
|
|
2572
2614
|
return {
|
|
2573
|
-
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(),
|
|
2574
|
-
balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(),
|
|
2575
|
-
storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(),
|
|
2576
|
-
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(),
|
|
2615
|
+
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : new Uint8Array(0),
|
|
2616
|
+
balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(0),
|
|
2617
|
+
storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(0),
|
|
2618
|
+
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
|
|
2577
2619
|
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2578
2620
|
};
|
|
2579
2621
|
},
|
|
2580
2622
|
toJSON(message) {
|
|
2581
2623
|
const obj = {};
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
obj.
|
|
2624
|
+
if (message.nonce.length !== 0) {
|
|
2625
|
+
obj.nonce = base64FromBytes(message.nonce);
|
|
2626
|
+
}
|
|
2627
|
+
if (message.balance.length !== 0) {
|
|
2628
|
+
obj.balance = base64FromBytes(message.balance);
|
|
2629
|
+
}
|
|
2630
|
+
if (message.storageHash.length !== 0) {
|
|
2631
|
+
obj.storageHash = base64FromBytes(message.storageHash);
|
|
2632
|
+
}
|
|
2633
|
+
if (message.codeHash.length !== 0) {
|
|
2634
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
2635
|
+
}
|
|
2636
|
+
if (message.siblings?.length) {
|
|
2637
|
+
obj.siblings = message.siblings.map((e) => base64FromBytes(e));
|
|
2590
2638
|
}
|
|
2591
2639
|
return obj;
|
|
2592
2640
|
},
|
|
@@ -2595,10 +2643,10 @@ var ProofEthereumAccount = {
|
|
|
2595
2643
|
},
|
|
2596
2644
|
fromPartial(object) {
|
|
2597
2645
|
const message = createBaseProofEthereumAccount();
|
|
2598
|
-
message.nonce = object.nonce ?? new Uint8Array();
|
|
2599
|
-
message.balance = object.balance ?? new Uint8Array();
|
|
2600
|
-
message.storageHash = object.storageHash ?? new Uint8Array();
|
|
2601
|
-
message.codeHash = object.codeHash ?? new Uint8Array();
|
|
2646
|
+
message.nonce = object.nonce ?? new Uint8Array(0);
|
|
2647
|
+
message.balance = object.balance ?? new Uint8Array(0);
|
|
2648
|
+
message.storageHash = object.storageHash ?? new Uint8Array(0);
|
|
2649
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
2602
2650
|
message.siblings = object.siblings?.map((e) => e) || [];
|
|
2603
2651
|
return message;
|
|
2604
2652
|
}
|
|
@@ -2624,19 +2672,19 @@ var ProofMinime = {
|
|
|
2624
2672
|
const tag = reader.uint32();
|
|
2625
2673
|
switch (tag >>> 3) {
|
|
2626
2674
|
case 1:
|
|
2627
|
-
if (tag
|
|
2675
|
+
if (tag !== 10) {
|
|
2628
2676
|
break;
|
|
2629
2677
|
}
|
|
2630
2678
|
message.proofPrevBlock = ProofEthereumStorage.decode(reader, reader.uint32());
|
|
2631
2679
|
continue;
|
|
2632
2680
|
case 2:
|
|
2633
|
-
if (tag
|
|
2681
|
+
if (tag !== 18) {
|
|
2634
2682
|
break;
|
|
2635
2683
|
}
|
|
2636
2684
|
message.proofNextBlock = ProofEthereumStorage.decode(reader, reader.uint32());
|
|
2637
2685
|
continue;
|
|
2638
2686
|
}
|
|
2639
|
-
if ((tag & 7)
|
|
2687
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2640
2688
|
break;
|
|
2641
2689
|
}
|
|
2642
2690
|
reader.skipType(tag & 7);
|
|
@@ -2651,8 +2699,12 @@ var ProofMinime = {
|
|
|
2651
2699
|
},
|
|
2652
2700
|
toJSON(message) {
|
|
2653
2701
|
const obj = {};
|
|
2654
|
-
message.proofPrevBlock !== void 0
|
|
2655
|
-
|
|
2702
|
+
if (message.proofPrevBlock !== void 0) {
|
|
2703
|
+
obj.proofPrevBlock = ProofEthereumStorage.toJSON(message.proofPrevBlock);
|
|
2704
|
+
}
|
|
2705
|
+
if (message.proofNextBlock !== void 0) {
|
|
2706
|
+
obj.proofNextBlock = ProofEthereumStorage.toJSON(message.proofNextBlock);
|
|
2707
|
+
}
|
|
2656
2708
|
return obj;
|
|
2657
2709
|
},
|
|
2658
2710
|
create(base) {
|
|
@@ -2666,7 +2718,7 @@ var ProofMinime = {
|
|
|
2666
2718
|
}
|
|
2667
2719
|
};
|
|
2668
2720
|
function createBaseProofCA() {
|
|
2669
|
-
return { type: 0, bundle: void 0, signature: new Uint8Array() };
|
|
2721
|
+
return { type: 0, bundle: void 0, signature: new Uint8Array(0) };
|
|
2670
2722
|
}
|
|
2671
2723
|
var ProofCA = {
|
|
2672
2724
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2689,25 +2741,25 @@ var ProofCA = {
|
|
|
2689
2741
|
const tag = reader.uint32();
|
|
2690
2742
|
switch (tag >>> 3) {
|
|
2691
2743
|
case 1:
|
|
2692
|
-
if (tag
|
|
2744
|
+
if (tag !== 8) {
|
|
2693
2745
|
break;
|
|
2694
2746
|
}
|
|
2695
2747
|
message.type = reader.int32();
|
|
2696
2748
|
continue;
|
|
2697
2749
|
case 2:
|
|
2698
|
-
if (tag
|
|
2750
|
+
if (tag !== 18) {
|
|
2699
2751
|
break;
|
|
2700
2752
|
}
|
|
2701
2753
|
message.bundle = CAbundle.decode(reader, reader.uint32());
|
|
2702
2754
|
continue;
|
|
2703
2755
|
case 3:
|
|
2704
|
-
if (tag
|
|
2756
|
+
if (tag !== 26) {
|
|
2705
2757
|
break;
|
|
2706
2758
|
}
|
|
2707
2759
|
message.signature = reader.bytes();
|
|
2708
2760
|
continue;
|
|
2709
2761
|
}
|
|
2710
|
-
if ((tag & 7)
|
|
2762
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2711
2763
|
break;
|
|
2712
2764
|
}
|
|
2713
2765
|
reader.skipType(tag & 7);
|
|
@@ -2718,14 +2770,20 @@ var ProofCA = {
|
|
|
2718
2770
|
return {
|
|
2719
2771
|
type: isSet(object.type) ? proofCA_TypeFromJSON(object.type) : 0,
|
|
2720
2772
|
bundle: isSet(object.bundle) ? CAbundle.fromJSON(object.bundle) : void 0,
|
|
2721
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array()
|
|
2773
|
+
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0)
|
|
2722
2774
|
};
|
|
2723
2775
|
},
|
|
2724
2776
|
toJSON(message) {
|
|
2725
2777
|
const obj = {};
|
|
2726
|
-
message.type !==
|
|
2727
|
-
|
|
2728
|
-
|
|
2778
|
+
if (message.type !== 0) {
|
|
2779
|
+
obj.type = proofCA_TypeToJSON(message.type);
|
|
2780
|
+
}
|
|
2781
|
+
if (message.bundle !== void 0) {
|
|
2782
|
+
obj.bundle = CAbundle.toJSON(message.bundle);
|
|
2783
|
+
}
|
|
2784
|
+
if (message.signature.length !== 0) {
|
|
2785
|
+
obj.signature = base64FromBytes(message.signature);
|
|
2786
|
+
}
|
|
2729
2787
|
return obj;
|
|
2730
2788
|
},
|
|
2731
2789
|
create(base) {
|
|
@@ -2735,12 +2793,12 @@ var ProofCA = {
|
|
|
2735
2793
|
const message = createBaseProofCA();
|
|
2736
2794
|
message.type = object.type ?? 0;
|
|
2737
2795
|
message.bundle = object.bundle !== void 0 && object.bundle !== null ? CAbundle.fromPartial(object.bundle) : void 0;
|
|
2738
|
-
message.signature = object.signature ?? new Uint8Array();
|
|
2796
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
2739
2797
|
return message;
|
|
2740
2798
|
}
|
|
2741
2799
|
};
|
|
2742
2800
|
function createBaseCAbundle() {
|
|
2743
|
-
return { processId: new Uint8Array(), address: new Uint8Array() };
|
|
2801
|
+
return { processId: new Uint8Array(0), address: new Uint8Array(0) };
|
|
2744
2802
|
}
|
|
2745
2803
|
var CAbundle = {
|
|
2746
2804
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -2760,19 +2818,19 @@ var CAbundle = {
|
|
|
2760
2818
|
const tag = reader.uint32();
|
|
2761
2819
|
switch (tag >>> 3) {
|
|
2762
2820
|
case 1:
|
|
2763
|
-
if (tag
|
|
2821
|
+
if (tag !== 10) {
|
|
2764
2822
|
break;
|
|
2765
2823
|
}
|
|
2766
2824
|
message.processId = reader.bytes();
|
|
2767
2825
|
continue;
|
|
2768
2826
|
case 2:
|
|
2769
|
-
if (tag
|
|
2827
|
+
if (tag !== 18) {
|
|
2770
2828
|
break;
|
|
2771
2829
|
}
|
|
2772
2830
|
message.address = reader.bytes();
|
|
2773
2831
|
continue;
|
|
2774
2832
|
}
|
|
2775
|
-
if ((tag & 7)
|
|
2833
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2776
2834
|
break;
|
|
2777
2835
|
}
|
|
2778
2836
|
reader.skipType(tag & 7);
|
|
@@ -2781,14 +2839,18 @@ var CAbundle = {
|
|
|
2781
2839
|
},
|
|
2782
2840
|
fromJSON(object) {
|
|
2783
2841
|
return {
|
|
2784
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
2785
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array()
|
|
2842
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
2843
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0)
|
|
2786
2844
|
};
|
|
2787
2845
|
},
|
|
2788
2846
|
toJSON(message) {
|
|
2789
2847
|
const obj = {};
|
|
2790
|
-
|
|
2791
|
-
|
|
2848
|
+
if (message.processId.length !== 0) {
|
|
2849
|
+
obj.processId = base64FromBytes(message.processId);
|
|
2850
|
+
}
|
|
2851
|
+
if (message.address.length !== 0) {
|
|
2852
|
+
obj.address = base64FromBytes(message.address);
|
|
2853
|
+
}
|
|
2792
2854
|
return obj;
|
|
2793
2855
|
},
|
|
2794
2856
|
create(base) {
|
|
@@ -2796,18 +2858,18 @@ var CAbundle = {
|
|
|
2796
2858
|
},
|
|
2797
2859
|
fromPartial(object) {
|
|
2798
2860
|
const message = createBaseCAbundle();
|
|
2799
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
2800
|
-
message.address = object.address ?? new Uint8Array();
|
|
2861
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
2862
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
2801
2863
|
return message;
|
|
2802
2864
|
}
|
|
2803
2865
|
};
|
|
2804
2866
|
function createBaseProofArbo() {
|
|
2805
2867
|
return {
|
|
2806
2868
|
type: 0,
|
|
2807
|
-
siblings: new Uint8Array(),
|
|
2808
|
-
|
|
2869
|
+
siblings: new Uint8Array(0),
|
|
2870
|
+
availableWeight: new Uint8Array(0),
|
|
2809
2871
|
keyType: 0,
|
|
2810
|
-
|
|
2872
|
+
voteWeight: new Uint8Array(0)
|
|
2811
2873
|
};
|
|
2812
2874
|
}
|
|
2813
2875
|
var ProofArbo = {
|
|
@@ -2818,14 +2880,14 @@ var ProofArbo = {
|
|
|
2818
2880
|
if (message.siblings.length !== 0) {
|
|
2819
2881
|
writer.uint32(18).bytes(message.siblings);
|
|
2820
2882
|
}
|
|
2821
|
-
if (message.
|
|
2822
|
-
writer.uint32(26).bytes(message.
|
|
2883
|
+
if (message.availableWeight.length !== 0) {
|
|
2884
|
+
writer.uint32(26).bytes(message.availableWeight);
|
|
2823
2885
|
}
|
|
2824
2886
|
if (message.keyType !== 0) {
|
|
2825
2887
|
writer.uint32(32).int32(message.keyType);
|
|
2826
2888
|
}
|
|
2827
|
-
if (message.
|
|
2828
|
-
writer.uint32(42).bytes(message.
|
|
2889
|
+
if (message.voteWeight.length !== 0) {
|
|
2890
|
+
writer.uint32(42).bytes(message.voteWeight);
|
|
2829
2891
|
}
|
|
2830
2892
|
return writer;
|
|
2831
2893
|
},
|
|
@@ -2837,37 +2899,37 @@ var ProofArbo = {
|
|
|
2837
2899
|
const tag = reader.uint32();
|
|
2838
2900
|
switch (tag >>> 3) {
|
|
2839
2901
|
case 1:
|
|
2840
|
-
if (tag
|
|
2902
|
+
if (tag !== 8) {
|
|
2841
2903
|
break;
|
|
2842
2904
|
}
|
|
2843
2905
|
message.type = reader.int32();
|
|
2844
2906
|
continue;
|
|
2845
2907
|
case 2:
|
|
2846
|
-
if (tag
|
|
2908
|
+
if (tag !== 18) {
|
|
2847
2909
|
break;
|
|
2848
2910
|
}
|
|
2849
2911
|
message.siblings = reader.bytes();
|
|
2850
2912
|
continue;
|
|
2851
2913
|
case 3:
|
|
2852
|
-
if (tag
|
|
2914
|
+
if (tag !== 26) {
|
|
2853
2915
|
break;
|
|
2854
2916
|
}
|
|
2855
|
-
message.
|
|
2917
|
+
message.availableWeight = reader.bytes();
|
|
2856
2918
|
continue;
|
|
2857
2919
|
case 4:
|
|
2858
|
-
if (tag
|
|
2920
|
+
if (tag !== 32) {
|
|
2859
2921
|
break;
|
|
2860
2922
|
}
|
|
2861
2923
|
message.keyType = reader.int32();
|
|
2862
2924
|
continue;
|
|
2863
2925
|
case 5:
|
|
2864
|
-
if (tag
|
|
2926
|
+
if (tag !== 42) {
|
|
2865
2927
|
break;
|
|
2866
2928
|
}
|
|
2867
|
-
message.
|
|
2929
|
+
message.voteWeight = reader.bytes();
|
|
2868
2930
|
continue;
|
|
2869
2931
|
}
|
|
2870
|
-
if ((tag & 7)
|
|
2932
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2871
2933
|
break;
|
|
2872
2934
|
}
|
|
2873
2935
|
reader.skipType(tag & 7);
|
|
@@ -2877,21 +2939,29 @@ var ProofArbo = {
|
|
|
2877
2939
|
fromJSON(object) {
|
|
2878
2940
|
return {
|
|
2879
2941
|
type: isSet(object.type) ? proofArbo_TypeFromJSON(object.type) : 0,
|
|
2880
|
-
siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(),
|
|
2881
|
-
|
|
2942
|
+
siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0),
|
|
2943
|
+
availableWeight: isSet(object.availableWeight) ? bytesFromBase64(object.availableWeight) : new Uint8Array(0),
|
|
2882
2944
|
keyType: isSet(object.keyType) ? proofArbo_KeyTypeFromJSON(object.keyType) : 0,
|
|
2883
|
-
|
|
2945
|
+
voteWeight: isSet(object.voteWeight) ? bytesFromBase64(object.voteWeight) : new Uint8Array(0)
|
|
2884
2946
|
};
|
|
2885
2947
|
},
|
|
2886
2948
|
toJSON(message) {
|
|
2887
2949
|
const obj = {};
|
|
2888
|
-
message.type !==
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
message.
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
)
|
|
2950
|
+
if (message.type !== 0) {
|
|
2951
|
+
obj.type = proofArbo_TypeToJSON(message.type);
|
|
2952
|
+
}
|
|
2953
|
+
if (message.siblings.length !== 0) {
|
|
2954
|
+
obj.siblings = base64FromBytes(message.siblings);
|
|
2955
|
+
}
|
|
2956
|
+
if (message.availableWeight.length !== 0) {
|
|
2957
|
+
obj.availableWeight = base64FromBytes(message.availableWeight);
|
|
2958
|
+
}
|
|
2959
|
+
if (message.keyType !== 0) {
|
|
2960
|
+
obj.keyType = proofArbo_KeyTypeToJSON(message.keyType);
|
|
2961
|
+
}
|
|
2962
|
+
if (message.voteWeight.length !== 0) {
|
|
2963
|
+
obj.voteWeight = base64FromBytes(message.voteWeight);
|
|
2964
|
+
}
|
|
2895
2965
|
return obj;
|
|
2896
2966
|
},
|
|
2897
2967
|
create(base) {
|
|
@@ -2900,10 +2970,10 @@ var ProofArbo = {
|
|
|
2900
2970
|
fromPartial(object) {
|
|
2901
2971
|
const message = createBaseProofArbo();
|
|
2902
2972
|
message.type = object.type ?? 0;
|
|
2903
|
-
message.siblings = object.siblings ?? new Uint8Array();
|
|
2904
|
-
message.
|
|
2973
|
+
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2974
|
+
message.availableWeight = object.availableWeight ?? new Uint8Array(0);
|
|
2905
2975
|
message.keyType = object.keyType ?? 0;
|
|
2906
|
-
message.
|
|
2976
|
+
message.voteWeight = object.voteWeight ?? new Uint8Array(0);
|
|
2907
2977
|
return message;
|
|
2908
2978
|
}
|
|
2909
2979
|
};
|
|
@@ -2937,37 +3007,37 @@ var ProofZkSNARK = {
|
|
|
2937
3007
|
const tag = reader.uint32();
|
|
2938
3008
|
switch (tag >>> 3) {
|
|
2939
3009
|
case 1:
|
|
2940
|
-
if (tag
|
|
3010
|
+
if (tag !== 8) {
|
|
2941
3011
|
break;
|
|
2942
3012
|
}
|
|
2943
3013
|
message.circuitParametersIndex = reader.int32();
|
|
2944
3014
|
continue;
|
|
2945
3015
|
case 2:
|
|
2946
|
-
if (tag
|
|
3016
|
+
if (tag !== 18) {
|
|
2947
3017
|
break;
|
|
2948
3018
|
}
|
|
2949
3019
|
message.a.push(reader.string());
|
|
2950
3020
|
continue;
|
|
2951
3021
|
case 3:
|
|
2952
|
-
if (tag
|
|
3022
|
+
if (tag !== 26) {
|
|
2953
3023
|
break;
|
|
2954
3024
|
}
|
|
2955
3025
|
message.b.push(reader.string());
|
|
2956
3026
|
continue;
|
|
2957
3027
|
case 4:
|
|
2958
|
-
if (tag
|
|
3028
|
+
if (tag !== 34) {
|
|
2959
3029
|
break;
|
|
2960
3030
|
}
|
|
2961
3031
|
message.c.push(reader.string());
|
|
2962
3032
|
continue;
|
|
2963
3033
|
case 5:
|
|
2964
|
-
if (tag
|
|
3034
|
+
if (tag !== 42) {
|
|
2965
3035
|
break;
|
|
2966
3036
|
}
|
|
2967
3037
|
message.publicInputs.push(reader.string());
|
|
2968
3038
|
continue;
|
|
2969
3039
|
}
|
|
2970
|
-
if ((tag & 7)
|
|
3040
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2971
3041
|
break;
|
|
2972
3042
|
}
|
|
2973
3043
|
reader.skipType(tag & 7);
|
|
@@ -2985,26 +3055,20 @@ var ProofZkSNARK = {
|
|
|
2985
3055
|
},
|
|
2986
3056
|
toJSON(message) {
|
|
2987
3057
|
const obj = {};
|
|
2988
|
-
message.circuitParametersIndex !==
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
obj.a =
|
|
2993
|
-
}
|
|
2994
|
-
if (message.b) {
|
|
2995
|
-
obj.b = message.b
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
obj.c = [];
|
|
3003
|
-
}
|
|
3004
|
-
if (message.publicInputs) {
|
|
3005
|
-
obj.publicInputs = message.publicInputs.map((e) => e);
|
|
3006
|
-
} else {
|
|
3007
|
-
obj.publicInputs = [];
|
|
3058
|
+
if (message.circuitParametersIndex !== 0) {
|
|
3059
|
+
obj.circuitParametersIndex = Math.round(message.circuitParametersIndex);
|
|
3060
|
+
}
|
|
3061
|
+
if (message.a?.length) {
|
|
3062
|
+
obj.a = message.a;
|
|
3063
|
+
}
|
|
3064
|
+
if (message.b?.length) {
|
|
3065
|
+
obj.b = message.b;
|
|
3066
|
+
}
|
|
3067
|
+
if (message.c?.length) {
|
|
3068
|
+
obj.c = message.c;
|
|
3069
|
+
}
|
|
3070
|
+
if (message.publicInputs?.length) {
|
|
3071
|
+
obj.publicInputs = message.publicInputs;
|
|
3008
3072
|
}
|
|
3009
3073
|
return obj;
|
|
3010
3074
|
},
|
|
@@ -3051,37 +3115,37 @@ var Account = {
|
|
|
3051
3115
|
const tag = reader.uint32();
|
|
3052
3116
|
switch (tag >>> 3) {
|
|
3053
3117
|
case 1:
|
|
3054
|
-
if (tag
|
|
3118
|
+
if (tag !== 8) {
|
|
3055
3119
|
break;
|
|
3056
3120
|
}
|
|
3057
3121
|
message.balance = longToNumber(reader.uint64());
|
|
3058
3122
|
continue;
|
|
3059
3123
|
case 2:
|
|
3060
|
-
if (tag
|
|
3124
|
+
if (tag !== 16) {
|
|
3061
3125
|
break;
|
|
3062
3126
|
}
|
|
3063
3127
|
message.nonce = reader.uint32();
|
|
3064
3128
|
continue;
|
|
3065
3129
|
case 3:
|
|
3066
|
-
if (tag
|
|
3130
|
+
if (tag !== 26) {
|
|
3067
3131
|
break;
|
|
3068
3132
|
}
|
|
3069
3133
|
message.infoURI = reader.string();
|
|
3070
3134
|
continue;
|
|
3071
3135
|
case 4:
|
|
3072
|
-
if (tag
|
|
3136
|
+
if (tag !== 34) {
|
|
3073
3137
|
break;
|
|
3074
3138
|
}
|
|
3075
3139
|
message.delegateAddrs.push(reader.bytes());
|
|
3076
3140
|
continue;
|
|
3077
3141
|
case 5:
|
|
3078
|
-
if (tag
|
|
3142
|
+
if (tag !== 40) {
|
|
3079
3143
|
break;
|
|
3080
3144
|
}
|
|
3081
3145
|
message.processIndex = reader.uint32();
|
|
3082
3146
|
continue;
|
|
3083
3147
|
}
|
|
3084
|
-
if ((tag & 7)
|
|
3148
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3085
3149
|
break;
|
|
3086
3150
|
}
|
|
3087
3151
|
reader.skipType(tag & 7);
|
|
@@ -3099,15 +3163,21 @@ var Account = {
|
|
|
3099
3163
|
},
|
|
3100
3164
|
toJSON(message) {
|
|
3101
3165
|
const obj = {};
|
|
3102
|
-
message.balance !==
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
if (message.
|
|
3106
|
-
obj.
|
|
3107
|
-
}
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3166
|
+
if (message.balance !== 0) {
|
|
3167
|
+
obj.balance = Math.round(message.balance);
|
|
3168
|
+
}
|
|
3169
|
+
if (message.nonce !== 0) {
|
|
3170
|
+
obj.nonce = Math.round(message.nonce);
|
|
3171
|
+
}
|
|
3172
|
+
if (message.infoURI !== "") {
|
|
3173
|
+
obj.infoURI = message.infoURI;
|
|
3174
|
+
}
|
|
3175
|
+
if (message.delegateAddrs?.length) {
|
|
3176
|
+
obj.delegateAddrs = message.delegateAddrs.map((e) => base64FromBytes(e));
|
|
3177
|
+
}
|
|
3178
|
+
if (message.processIndex !== 0) {
|
|
3179
|
+
obj.processIndex = Math.round(message.processIndex);
|
|
3180
|
+
}
|
|
3111
3181
|
return obj;
|
|
3112
3182
|
},
|
|
3113
3183
|
create(base) {
|
|
@@ -3124,7 +3194,7 @@ var Account = {
|
|
|
3124
3194
|
}
|
|
3125
3195
|
};
|
|
3126
3196
|
function createBaseTreasurer() {
|
|
3127
|
-
return { address: new Uint8Array(), nonce: 0 };
|
|
3197
|
+
return { address: new Uint8Array(0), nonce: 0 };
|
|
3128
3198
|
}
|
|
3129
3199
|
var Treasurer = {
|
|
3130
3200
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3144,19 +3214,19 @@ var Treasurer = {
|
|
|
3144
3214
|
const tag = reader.uint32();
|
|
3145
3215
|
switch (tag >>> 3) {
|
|
3146
3216
|
case 1:
|
|
3147
|
-
if (tag
|
|
3217
|
+
if (tag !== 10) {
|
|
3148
3218
|
break;
|
|
3149
3219
|
}
|
|
3150
3220
|
message.address = reader.bytes();
|
|
3151
3221
|
continue;
|
|
3152
3222
|
case 2:
|
|
3153
|
-
if (tag
|
|
3223
|
+
if (tag !== 16) {
|
|
3154
3224
|
break;
|
|
3155
3225
|
}
|
|
3156
3226
|
message.nonce = reader.uint32();
|
|
3157
3227
|
continue;
|
|
3158
3228
|
}
|
|
3159
|
-
if ((tag & 7)
|
|
3229
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3160
3230
|
break;
|
|
3161
3231
|
}
|
|
3162
3232
|
reader.skipType(tag & 7);
|
|
@@ -3165,14 +3235,18 @@ var Treasurer = {
|
|
|
3165
3235
|
},
|
|
3166
3236
|
fromJSON(object) {
|
|
3167
3237
|
return {
|
|
3168
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
|
|
3238
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
3169
3239
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0
|
|
3170
3240
|
};
|
|
3171
3241
|
},
|
|
3172
3242
|
toJSON(message) {
|
|
3173
3243
|
const obj = {};
|
|
3174
|
-
|
|
3175
|
-
|
|
3244
|
+
if (message.address.length !== 0) {
|
|
3245
|
+
obj.address = base64FromBytes(message.address);
|
|
3246
|
+
}
|
|
3247
|
+
if (message.nonce !== 0) {
|
|
3248
|
+
obj.nonce = Math.round(message.nonce);
|
|
3249
|
+
}
|
|
3176
3250
|
return obj;
|
|
3177
3251
|
},
|
|
3178
3252
|
create(base) {
|
|
@@ -3180,7 +3254,7 @@ var Treasurer = {
|
|
|
3180
3254
|
},
|
|
3181
3255
|
fromPartial(object) {
|
|
3182
3256
|
const message = createBaseTreasurer();
|
|
3183
|
-
message.address = object.address ?? new Uint8Array();
|
|
3257
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
3184
3258
|
message.nonce = object.nonce ?? 0;
|
|
3185
3259
|
return message;
|
|
3186
3260
|
}
|
|
@@ -3224,6 +3298,12 @@ var Tx = {
|
|
|
3224
3298
|
case "setKeykeeper":
|
|
3225
3299
|
SetKeykeeperTx.encode(message.payload.setKeykeeper, writer.uint32(90).fork()).ldelim();
|
|
3226
3300
|
break;
|
|
3301
|
+
case "setSik":
|
|
3302
|
+
SikTx.encode(message.payload.setSik, writer.uint32(98).fork()).ldelim();
|
|
3303
|
+
break;
|
|
3304
|
+
case "delSik":
|
|
3305
|
+
SikTx.encode(message.payload.delSik, writer.uint32(106).fork()).ldelim();
|
|
3306
|
+
break;
|
|
3227
3307
|
}
|
|
3228
3308
|
return writer;
|
|
3229
3309
|
},
|
|
@@ -3235,49 +3315,49 @@ var Tx = {
|
|
|
3235
3315
|
const tag = reader.uint32();
|
|
3236
3316
|
switch (tag >>> 3) {
|
|
3237
3317
|
case 1:
|
|
3238
|
-
if (tag
|
|
3318
|
+
if (tag !== 10) {
|
|
3239
3319
|
break;
|
|
3240
3320
|
}
|
|
3241
3321
|
message.payload = { $case: "vote", vote: VoteEnvelope.decode(reader, reader.uint32()) };
|
|
3242
3322
|
continue;
|
|
3243
3323
|
case 2:
|
|
3244
|
-
if (tag
|
|
3324
|
+
if (tag !== 18) {
|
|
3245
3325
|
break;
|
|
3246
3326
|
}
|
|
3247
3327
|
message.payload = { $case: "newProcess", newProcess: NewProcessTx.decode(reader, reader.uint32()) };
|
|
3248
3328
|
continue;
|
|
3249
3329
|
case 3:
|
|
3250
|
-
if (tag
|
|
3330
|
+
if (tag !== 26) {
|
|
3251
3331
|
break;
|
|
3252
3332
|
}
|
|
3253
3333
|
message.payload = { $case: "admin", admin: AdminTx.decode(reader, reader.uint32()) };
|
|
3254
3334
|
continue;
|
|
3255
3335
|
case 4:
|
|
3256
|
-
if (tag
|
|
3336
|
+
if (tag !== 34) {
|
|
3257
3337
|
break;
|
|
3258
3338
|
}
|
|
3259
3339
|
message.payload = { $case: "setProcess", setProcess: SetProcessTx.decode(reader, reader.uint32()) };
|
|
3260
3340
|
continue;
|
|
3261
3341
|
case 5:
|
|
3262
|
-
if (tag
|
|
3342
|
+
if (tag !== 42) {
|
|
3263
3343
|
break;
|
|
3264
3344
|
}
|
|
3265
3345
|
message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.decode(reader, reader.uint32()) };
|
|
3266
3346
|
continue;
|
|
3267
3347
|
case 6:
|
|
3268
|
-
if (tag
|
|
3348
|
+
if (tag !== 50) {
|
|
3269
3349
|
break;
|
|
3270
3350
|
}
|
|
3271
3351
|
message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.decode(reader, reader.uint32()) };
|
|
3272
3352
|
continue;
|
|
3273
3353
|
case 7:
|
|
3274
|
-
if (tag
|
|
3354
|
+
if (tag !== 58) {
|
|
3275
3355
|
break;
|
|
3276
3356
|
}
|
|
3277
3357
|
message.payload = { $case: "sendTokens", sendTokens: SendTokensTx.decode(reader, reader.uint32()) };
|
|
3278
3358
|
continue;
|
|
3279
3359
|
case 8:
|
|
3280
|
-
if (tag
|
|
3360
|
+
if (tag !== 66) {
|
|
3281
3361
|
break;
|
|
3282
3362
|
}
|
|
3283
3363
|
message.payload = {
|
|
@@ -3286,25 +3366,37 @@ var Tx = {
|
|
|
3286
3366
|
};
|
|
3287
3367
|
continue;
|
|
3288
3368
|
case 9:
|
|
3289
|
-
if (tag
|
|
3369
|
+
if (tag !== 74) {
|
|
3290
3370
|
break;
|
|
3291
3371
|
}
|
|
3292
3372
|
message.payload = { $case: "setAccount", setAccount: SetAccountTx.decode(reader, reader.uint32()) };
|
|
3293
3373
|
continue;
|
|
3294
3374
|
case 10:
|
|
3295
|
-
if (tag
|
|
3375
|
+
if (tag !== 82) {
|
|
3296
3376
|
break;
|
|
3297
3377
|
}
|
|
3298
3378
|
message.payload = { $case: "collectFaucet", collectFaucet: CollectFaucetTx.decode(reader, reader.uint32()) };
|
|
3299
3379
|
continue;
|
|
3300
3380
|
case 11:
|
|
3301
|
-
if (tag
|
|
3381
|
+
if (tag !== 90) {
|
|
3302
3382
|
break;
|
|
3303
3383
|
}
|
|
3304
3384
|
message.payload = { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.decode(reader, reader.uint32()) };
|
|
3305
3385
|
continue;
|
|
3386
|
+
case 12:
|
|
3387
|
+
if (tag !== 98) {
|
|
3388
|
+
break;
|
|
3389
|
+
}
|
|
3390
|
+
message.payload = { $case: "setSik", setSik: SikTx.decode(reader, reader.uint32()) };
|
|
3391
|
+
continue;
|
|
3392
|
+
case 13:
|
|
3393
|
+
if (tag !== 106) {
|
|
3394
|
+
break;
|
|
3395
|
+
}
|
|
3396
|
+
message.payload = { $case: "delSik", delSik: SikTx.decode(reader, reader.uint32()) };
|
|
3397
|
+
continue;
|
|
3306
3398
|
}
|
|
3307
|
-
if ((tag & 7)
|
|
3399
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3308
3400
|
break;
|
|
3309
3401
|
}
|
|
3310
3402
|
reader.skipType(tag & 7);
|
|
@@ -3316,22 +3408,50 @@ var Tx = {
|
|
|
3316
3408
|
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) ? {
|
|
3317
3409
|
$case: "setTransactionCosts",
|
|
3318
3410
|
setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
|
|
3319
|
-
} : 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
|
|
3411
|
+
} : 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
|
|
3320
3412
|
};
|
|
3321
3413
|
},
|
|
3322
3414
|
toJSON(message) {
|
|
3323
3415
|
const obj = {};
|
|
3324
|
-
message.payload?.$case === "vote"
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
message.payload?.$case === "
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
message.payload?.$case === "
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
message.payload?.$case === "
|
|
3334
|
-
|
|
3416
|
+
if (message.payload?.$case === "vote") {
|
|
3417
|
+
obj.vote = VoteEnvelope.toJSON(message.payload.vote);
|
|
3418
|
+
}
|
|
3419
|
+
if (message.payload?.$case === "newProcess") {
|
|
3420
|
+
obj.newProcess = NewProcessTx.toJSON(message.payload.newProcess);
|
|
3421
|
+
}
|
|
3422
|
+
if (message.payload?.$case === "admin") {
|
|
3423
|
+
obj.admin = AdminTx.toJSON(message.payload.admin);
|
|
3424
|
+
}
|
|
3425
|
+
if (message.payload?.$case === "setProcess") {
|
|
3426
|
+
obj.setProcess = SetProcessTx.toJSON(message.payload.setProcess);
|
|
3427
|
+
}
|
|
3428
|
+
if (message.payload?.$case === "registerKey") {
|
|
3429
|
+
obj.registerKey = RegisterKeyTx.toJSON(message.payload.registerKey);
|
|
3430
|
+
}
|
|
3431
|
+
if (message.payload?.$case === "mintTokens") {
|
|
3432
|
+
obj.mintTokens = MintTokensTx.toJSON(message.payload.mintTokens);
|
|
3433
|
+
}
|
|
3434
|
+
if (message.payload?.$case === "sendTokens") {
|
|
3435
|
+
obj.sendTokens = SendTokensTx.toJSON(message.payload.sendTokens);
|
|
3436
|
+
}
|
|
3437
|
+
if (message.payload?.$case === "setTransactionCosts") {
|
|
3438
|
+
obj.setTransactionCosts = SetTransactionCostsTx.toJSON(message.payload.setTransactionCosts);
|
|
3439
|
+
}
|
|
3440
|
+
if (message.payload?.$case === "setAccount") {
|
|
3441
|
+
obj.setAccount = SetAccountTx.toJSON(message.payload.setAccount);
|
|
3442
|
+
}
|
|
3443
|
+
if (message.payload?.$case === "collectFaucet") {
|
|
3444
|
+
obj.collectFaucet = CollectFaucetTx.toJSON(message.payload.collectFaucet);
|
|
3445
|
+
}
|
|
3446
|
+
if (message.payload?.$case === "setKeykeeper") {
|
|
3447
|
+
obj.setKeykeeper = SetKeykeeperTx.toJSON(message.payload.setKeykeeper);
|
|
3448
|
+
}
|
|
3449
|
+
if (message.payload?.$case === "setSik") {
|
|
3450
|
+
obj.setSik = SikTx.toJSON(message.payload.setSik);
|
|
3451
|
+
}
|
|
3452
|
+
if (message.payload?.$case === "delSik") {
|
|
3453
|
+
obj.delSik = SikTx.toJSON(message.payload.delSik);
|
|
3454
|
+
}
|
|
3335
3455
|
return obj;
|
|
3336
3456
|
},
|
|
3337
3457
|
create(base) {
|
|
@@ -3381,11 +3501,17 @@ var Tx = {
|
|
|
3381
3501
|
setKeykeeper: SetKeykeeperTx.fromPartial(object.payload.setKeykeeper)
|
|
3382
3502
|
};
|
|
3383
3503
|
}
|
|
3504
|
+
if (object.payload?.$case === "setSik" && object.payload?.setSik !== void 0 && object.payload?.setSik !== null) {
|
|
3505
|
+
message.payload = { $case: "setSik", setSik: SikTx.fromPartial(object.payload.setSik) };
|
|
3506
|
+
}
|
|
3507
|
+
if (object.payload?.$case === "delSik" && object.payload?.delSik !== void 0 && object.payload?.delSik !== null) {
|
|
3508
|
+
message.payload = { $case: "delSik", delSik: SikTx.fromPartial(object.payload.delSik) };
|
|
3509
|
+
}
|
|
3384
3510
|
return message;
|
|
3385
3511
|
}
|
|
3386
3512
|
};
|
|
3387
3513
|
function createBaseSignedTx() {
|
|
3388
|
-
return { tx: new Uint8Array(), signature: void 0 };
|
|
3514
|
+
return { tx: new Uint8Array(0), signature: void 0 };
|
|
3389
3515
|
}
|
|
3390
3516
|
var SignedTx = {
|
|
3391
3517
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3405,19 +3531,19 @@ var SignedTx = {
|
|
|
3405
3531
|
const tag = reader.uint32();
|
|
3406
3532
|
switch (tag >>> 3) {
|
|
3407
3533
|
case 1:
|
|
3408
|
-
if (tag
|
|
3534
|
+
if (tag !== 10) {
|
|
3409
3535
|
break;
|
|
3410
3536
|
}
|
|
3411
3537
|
message.tx = reader.bytes();
|
|
3412
3538
|
continue;
|
|
3413
3539
|
case 2:
|
|
3414
|
-
if (tag
|
|
3540
|
+
if (tag !== 18) {
|
|
3415
3541
|
break;
|
|
3416
3542
|
}
|
|
3417
3543
|
message.signature = reader.bytes();
|
|
3418
3544
|
continue;
|
|
3419
3545
|
}
|
|
3420
|
-
if ((tag & 7)
|
|
3546
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3421
3547
|
break;
|
|
3422
3548
|
}
|
|
3423
3549
|
reader.skipType(tag & 7);
|
|
@@ -3426,14 +3552,18 @@ var SignedTx = {
|
|
|
3426
3552
|
},
|
|
3427
3553
|
fromJSON(object) {
|
|
3428
3554
|
return {
|
|
3429
|
-
tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
|
|
3555
|
+
tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(0),
|
|
3430
3556
|
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : void 0
|
|
3431
3557
|
};
|
|
3432
3558
|
},
|
|
3433
3559
|
toJSON(message) {
|
|
3434
3560
|
const obj = {};
|
|
3435
|
-
|
|
3436
|
-
|
|
3561
|
+
if (message.tx.length !== 0) {
|
|
3562
|
+
obj.tx = base64FromBytes(message.tx);
|
|
3563
|
+
}
|
|
3564
|
+
if (message.signature !== void 0) {
|
|
3565
|
+
obj.signature = base64FromBytes(message.signature);
|
|
3566
|
+
}
|
|
3437
3567
|
return obj;
|
|
3438
3568
|
},
|
|
3439
3569
|
create(base) {
|
|
@@ -3441,7 +3571,7 @@ var SignedTx = {
|
|
|
3441
3571
|
},
|
|
3442
3572
|
fromPartial(object) {
|
|
3443
3573
|
const message = createBaseSignedTx();
|
|
3444
|
-
message.tx = object.tx ?? new Uint8Array();
|
|
3574
|
+
message.tx = object.tx ?? new Uint8Array(0);
|
|
3445
3575
|
message.signature = object.signature ?? void 0;
|
|
3446
3576
|
return message;
|
|
3447
3577
|
}
|
|
@@ -3470,25 +3600,25 @@ var NewProcessTx = {
|
|
|
3470
3600
|
const tag = reader.uint32();
|
|
3471
3601
|
switch (tag >>> 3) {
|
|
3472
3602
|
case 1:
|
|
3473
|
-
if (tag
|
|
3603
|
+
if (tag !== 8) {
|
|
3474
3604
|
break;
|
|
3475
3605
|
}
|
|
3476
3606
|
message.txtype = reader.int32();
|
|
3477
3607
|
continue;
|
|
3478
3608
|
case 2:
|
|
3479
|
-
if (tag
|
|
3609
|
+
if (tag !== 16) {
|
|
3480
3610
|
break;
|
|
3481
3611
|
}
|
|
3482
3612
|
message.nonce = reader.uint32();
|
|
3483
3613
|
continue;
|
|
3484
3614
|
case 3:
|
|
3485
|
-
if (tag
|
|
3615
|
+
if (tag !== 26) {
|
|
3486
3616
|
break;
|
|
3487
3617
|
}
|
|
3488
3618
|
message.process = Process.decode(reader, reader.uint32());
|
|
3489
3619
|
continue;
|
|
3490
3620
|
}
|
|
3491
|
-
if ((tag & 7)
|
|
3621
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3492
3622
|
break;
|
|
3493
3623
|
}
|
|
3494
3624
|
reader.skipType(tag & 7);
|
|
@@ -3504,9 +3634,15 @@ var NewProcessTx = {
|
|
|
3504
3634
|
},
|
|
3505
3635
|
toJSON(message) {
|
|
3506
3636
|
const obj = {};
|
|
3507
|
-
message.txtype !==
|
|
3508
|
-
|
|
3509
|
-
|
|
3637
|
+
if (message.txtype !== 0) {
|
|
3638
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
3639
|
+
}
|
|
3640
|
+
if (message.nonce !== 0) {
|
|
3641
|
+
obj.nonce = Math.round(message.nonce);
|
|
3642
|
+
}
|
|
3643
|
+
if (message.process !== void 0) {
|
|
3644
|
+
obj.process = Process.toJSON(message.process);
|
|
3645
|
+
}
|
|
3510
3646
|
return obj;
|
|
3511
3647
|
},
|
|
3512
3648
|
create(base) {
|
|
@@ -3524,7 +3660,7 @@ function createBaseSetProcessTx() {
|
|
|
3524
3660
|
return {
|
|
3525
3661
|
txtype: 0,
|
|
3526
3662
|
nonce: 0,
|
|
3527
|
-
processId: new Uint8Array(),
|
|
3663
|
+
processId: new Uint8Array(0),
|
|
3528
3664
|
status: void 0,
|
|
3529
3665
|
questionIndex: void 0,
|
|
3530
3666
|
censusRoot: void 0,
|
|
@@ -3572,61 +3708,61 @@ var SetProcessTx = {
|
|
|
3572
3708
|
const tag = reader.uint32();
|
|
3573
3709
|
switch (tag >>> 3) {
|
|
3574
3710
|
case 1:
|
|
3575
|
-
if (tag
|
|
3711
|
+
if (tag !== 8) {
|
|
3576
3712
|
break;
|
|
3577
3713
|
}
|
|
3578
3714
|
message.txtype = reader.int32();
|
|
3579
3715
|
continue;
|
|
3580
3716
|
case 2:
|
|
3581
|
-
if (tag
|
|
3717
|
+
if (tag !== 16) {
|
|
3582
3718
|
break;
|
|
3583
3719
|
}
|
|
3584
3720
|
message.nonce = reader.uint32();
|
|
3585
3721
|
continue;
|
|
3586
3722
|
case 3:
|
|
3587
|
-
if (tag
|
|
3723
|
+
if (tag !== 26) {
|
|
3588
3724
|
break;
|
|
3589
3725
|
}
|
|
3590
3726
|
message.processId = reader.bytes();
|
|
3591
3727
|
continue;
|
|
3592
3728
|
case 4:
|
|
3593
|
-
if (tag
|
|
3729
|
+
if (tag !== 32) {
|
|
3594
3730
|
break;
|
|
3595
3731
|
}
|
|
3596
3732
|
message.status = reader.int32();
|
|
3597
3733
|
continue;
|
|
3598
3734
|
case 5:
|
|
3599
|
-
if (tag
|
|
3735
|
+
if (tag !== 40) {
|
|
3600
3736
|
break;
|
|
3601
3737
|
}
|
|
3602
3738
|
message.questionIndex = reader.uint32();
|
|
3603
3739
|
continue;
|
|
3604
3740
|
case 6:
|
|
3605
|
-
if (tag
|
|
3741
|
+
if (tag !== 50) {
|
|
3606
3742
|
break;
|
|
3607
3743
|
}
|
|
3608
3744
|
message.censusRoot = reader.bytes();
|
|
3609
3745
|
continue;
|
|
3610
3746
|
case 7:
|
|
3611
|
-
if (tag
|
|
3747
|
+
if (tag !== 58) {
|
|
3612
3748
|
break;
|
|
3613
3749
|
}
|
|
3614
3750
|
message.censusURI = reader.string();
|
|
3615
3751
|
continue;
|
|
3616
3752
|
case 8:
|
|
3617
|
-
if (tag
|
|
3753
|
+
if (tag !== 66) {
|
|
3618
3754
|
break;
|
|
3619
3755
|
}
|
|
3620
3756
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
3621
3757
|
continue;
|
|
3622
3758
|
case 9:
|
|
3623
|
-
if (tag
|
|
3759
|
+
if (tag !== 74) {
|
|
3624
3760
|
break;
|
|
3625
3761
|
}
|
|
3626
3762
|
message.results = ProcessResult.decode(reader, reader.uint32());
|
|
3627
3763
|
continue;
|
|
3628
3764
|
}
|
|
3629
|
-
if ((tag & 7)
|
|
3765
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3630
3766
|
break;
|
|
3631
3767
|
}
|
|
3632
3768
|
reader.skipType(tag & 7);
|
|
@@ -3637,7 +3773,7 @@ var SetProcessTx = {
|
|
|
3637
3773
|
return {
|
|
3638
3774
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3639
3775
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3640
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
3776
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3641
3777
|
status: isSet(object.status) ? processStatusFromJSON(object.status) : void 0,
|
|
3642
3778
|
questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
|
|
3643
3779
|
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : void 0,
|
|
@@ -3648,15 +3784,33 @@ var SetProcessTx = {
|
|
|
3648
3784
|
},
|
|
3649
3785
|
toJSON(message) {
|
|
3650
3786
|
const obj = {};
|
|
3651
|
-
message.txtype !==
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
message.
|
|
3658
|
-
|
|
3659
|
-
|
|
3787
|
+
if (message.txtype !== 0) {
|
|
3788
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
3789
|
+
}
|
|
3790
|
+
if (message.nonce !== 0) {
|
|
3791
|
+
obj.nonce = Math.round(message.nonce);
|
|
3792
|
+
}
|
|
3793
|
+
if (message.processId.length !== 0) {
|
|
3794
|
+
obj.processId = base64FromBytes(message.processId);
|
|
3795
|
+
}
|
|
3796
|
+
if (message.status !== void 0) {
|
|
3797
|
+
obj.status = processStatusToJSON(message.status);
|
|
3798
|
+
}
|
|
3799
|
+
if (message.questionIndex !== void 0) {
|
|
3800
|
+
obj.questionIndex = Math.round(message.questionIndex);
|
|
3801
|
+
}
|
|
3802
|
+
if (message.censusRoot !== void 0) {
|
|
3803
|
+
obj.censusRoot = base64FromBytes(message.censusRoot);
|
|
3804
|
+
}
|
|
3805
|
+
if (message.censusURI !== void 0) {
|
|
3806
|
+
obj.censusURI = message.censusURI;
|
|
3807
|
+
}
|
|
3808
|
+
if (message.proof !== void 0) {
|
|
3809
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
3810
|
+
}
|
|
3811
|
+
if (message.results !== void 0) {
|
|
3812
|
+
obj.results = ProcessResult.toJSON(message.results);
|
|
3813
|
+
}
|
|
3660
3814
|
return obj;
|
|
3661
3815
|
},
|
|
3662
3816
|
create(base) {
|
|
@@ -3666,7 +3820,7 @@ var SetProcessTx = {
|
|
|
3666
3820
|
const message = createBaseSetProcessTx();
|
|
3667
3821
|
message.txtype = object.txtype ?? 0;
|
|
3668
3822
|
message.nonce = object.nonce ?? 0;
|
|
3669
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
3823
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
3670
3824
|
message.status = object.status ?? void 0;
|
|
3671
3825
|
message.questionIndex = object.questionIndex ?? void 0;
|
|
3672
3826
|
message.censusRoot = object.censusRoot ?? void 0;
|
|
@@ -3679,7 +3833,7 @@ var SetProcessTx = {
|
|
|
3679
3833
|
function createBaseAdminTx() {
|
|
3680
3834
|
return {
|
|
3681
3835
|
txtype: 0,
|
|
3682
|
-
processId: new Uint8Array(),
|
|
3836
|
+
processId: new Uint8Array(0),
|
|
3683
3837
|
address: void 0,
|
|
3684
3838
|
encryptionPrivateKey: void 0,
|
|
3685
3839
|
encryptionPublicKey: void 0,
|
|
@@ -3728,61 +3882,61 @@ var AdminTx = {
|
|
|
3728
3882
|
const tag = reader.uint32();
|
|
3729
3883
|
switch (tag >>> 3) {
|
|
3730
3884
|
case 1:
|
|
3731
|
-
if (tag
|
|
3885
|
+
if (tag !== 8) {
|
|
3732
3886
|
break;
|
|
3733
3887
|
}
|
|
3734
3888
|
message.txtype = reader.int32();
|
|
3735
3889
|
continue;
|
|
3736
3890
|
case 2:
|
|
3737
|
-
if (tag
|
|
3891
|
+
if (tag !== 18) {
|
|
3738
3892
|
break;
|
|
3739
3893
|
}
|
|
3740
3894
|
message.processId = reader.bytes();
|
|
3741
3895
|
continue;
|
|
3742
3896
|
case 3:
|
|
3743
|
-
if (tag
|
|
3897
|
+
if (tag !== 26) {
|
|
3744
3898
|
break;
|
|
3745
3899
|
}
|
|
3746
3900
|
message.address = reader.bytes();
|
|
3747
3901
|
continue;
|
|
3748
3902
|
case 5:
|
|
3749
|
-
if (tag
|
|
3903
|
+
if (tag !== 42) {
|
|
3750
3904
|
break;
|
|
3751
3905
|
}
|
|
3752
3906
|
message.encryptionPrivateKey = reader.bytes();
|
|
3753
3907
|
continue;
|
|
3754
3908
|
case 6:
|
|
3755
|
-
if (tag
|
|
3909
|
+
if (tag !== 50) {
|
|
3756
3910
|
break;
|
|
3757
3911
|
}
|
|
3758
3912
|
message.encryptionPublicKey = reader.bytes();
|
|
3759
3913
|
continue;
|
|
3760
3914
|
case 7:
|
|
3761
|
-
if (tag
|
|
3915
|
+
if (tag !== 56) {
|
|
3762
3916
|
break;
|
|
3763
3917
|
}
|
|
3764
3918
|
message.keyIndex = reader.uint32();
|
|
3765
3919
|
continue;
|
|
3766
3920
|
case 8:
|
|
3767
|
-
if (tag
|
|
3921
|
+
if (tag !== 64) {
|
|
3768
3922
|
break;
|
|
3769
3923
|
}
|
|
3770
3924
|
message.power = longToNumber(reader.uint64());
|
|
3771
3925
|
continue;
|
|
3772
3926
|
case 9:
|
|
3773
|
-
if (tag
|
|
3927
|
+
if (tag !== 74) {
|
|
3774
3928
|
break;
|
|
3775
3929
|
}
|
|
3776
3930
|
message.publicKey = reader.bytes();
|
|
3777
3931
|
continue;
|
|
3778
3932
|
case 11:
|
|
3779
|
-
if (tag
|
|
3933
|
+
if (tag !== 88) {
|
|
3780
3934
|
break;
|
|
3781
3935
|
}
|
|
3782
3936
|
message.nonce = reader.uint32();
|
|
3783
3937
|
continue;
|
|
3784
3938
|
}
|
|
3785
|
-
if ((tag & 7)
|
|
3939
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3786
3940
|
break;
|
|
3787
3941
|
}
|
|
3788
3942
|
reader.skipType(tag & 7);
|
|
@@ -3792,7 +3946,7 @@ var AdminTx = {
|
|
|
3792
3946
|
fromJSON(object) {
|
|
3793
3947
|
return {
|
|
3794
3948
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3795
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
3949
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3796
3950
|
address: isSet(object.address) ? bytesFromBase64(object.address) : void 0,
|
|
3797
3951
|
encryptionPrivateKey: isSet(object.encryptionPrivateKey) ? bytesFromBase64(object.encryptionPrivateKey) : void 0,
|
|
3798
3952
|
encryptionPublicKey: isSet(object.encryptionPublicKey) ? bytesFromBase64(object.encryptionPublicKey) : void 0,
|
|
@@ -3804,15 +3958,33 @@ var AdminTx = {
|
|
|
3804
3958
|
},
|
|
3805
3959
|
toJSON(message) {
|
|
3806
3960
|
const obj = {};
|
|
3807
|
-
message.txtype !==
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
message.
|
|
3814
|
-
|
|
3815
|
-
|
|
3961
|
+
if (message.txtype !== 0) {
|
|
3962
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
3963
|
+
}
|
|
3964
|
+
if (message.processId.length !== 0) {
|
|
3965
|
+
obj.processId = base64FromBytes(message.processId);
|
|
3966
|
+
}
|
|
3967
|
+
if (message.address !== void 0) {
|
|
3968
|
+
obj.address = base64FromBytes(message.address);
|
|
3969
|
+
}
|
|
3970
|
+
if (message.encryptionPrivateKey !== void 0) {
|
|
3971
|
+
obj.encryptionPrivateKey = base64FromBytes(message.encryptionPrivateKey);
|
|
3972
|
+
}
|
|
3973
|
+
if (message.encryptionPublicKey !== void 0) {
|
|
3974
|
+
obj.encryptionPublicKey = base64FromBytes(message.encryptionPublicKey);
|
|
3975
|
+
}
|
|
3976
|
+
if (message.keyIndex !== void 0) {
|
|
3977
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
3978
|
+
}
|
|
3979
|
+
if (message.power !== void 0) {
|
|
3980
|
+
obj.power = Math.round(message.power);
|
|
3981
|
+
}
|
|
3982
|
+
if (message.publicKey !== void 0) {
|
|
3983
|
+
obj.publicKey = base64FromBytes(message.publicKey);
|
|
3984
|
+
}
|
|
3985
|
+
if (message.nonce !== 0) {
|
|
3986
|
+
obj.nonce = Math.round(message.nonce);
|
|
3987
|
+
}
|
|
3816
3988
|
return obj;
|
|
3817
3989
|
},
|
|
3818
3990
|
create(base) {
|
|
@@ -3821,7 +3993,7 @@ var AdminTx = {
|
|
|
3821
3993
|
fromPartial(object) {
|
|
3822
3994
|
const message = createBaseAdminTx();
|
|
3823
3995
|
message.txtype = object.txtype ?? 0;
|
|
3824
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
3996
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
3825
3997
|
message.address = object.address ?? void 0;
|
|
3826
3998
|
message.encryptionPrivateKey = object.encryptionPrivateKey ?? void 0;
|
|
3827
3999
|
message.encryptionPublicKey = object.encryptionPublicKey ?? void 0;
|
|
@@ -3833,7 +4005,7 @@ var AdminTx = {
|
|
|
3833
4005
|
}
|
|
3834
4006
|
};
|
|
3835
4007
|
function createBaseRegisterKeyTx() {
|
|
3836
|
-
return { nonce: 0, processId: new Uint8Array(), proof: void 0, newKey: new Uint8Array(), weight: "" };
|
|
4008
|
+
return { nonce: 0, processId: new Uint8Array(0), proof: void 0, newKey: new Uint8Array(0), weight: "" };
|
|
3837
4009
|
}
|
|
3838
4010
|
var RegisterKeyTx = {
|
|
3839
4011
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3862,37 +4034,37 @@ var RegisterKeyTx = {
|
|
|
3862
4034
|
const tag = reader.uint32();
|
|
3863
4035
|
switch (tag >>> 3) {
|
|
3864
4036
|
case 1:
|
|
3865
|
-
if (tag
|
|
4037
|
+
if (tag !== 8) {
|
|
3866
4038
|
break;
|
|
3867
4039
|
}
|
|
3868
4040
|
message.nonce = reader.uint32();
|
|
3869
4041
|
continue;
|
|
3870
4042
|
case 2:
|
|
3871
|
-
if (tag
|
|
4043
|
+
if (tag !== 18) {
|
|
3872
4044
|
break;
|
|
3873
4045
|
}
|
|
3874
4046
|
message.processId = reader.bytes();
|
|
3875
4047
|
continue;
|
|
3876
4048
|
case 3:
|
|
3877
|
-
if (tag
|
|
4049
|
+
if (tag !== 26) {
|
|
3878
4050
|
break;
|
|
3879
4051
|
}
|
|
3880
4052
|
message.proof = Proof.decode(reader, reader.uint32());
|
|
3881
4053
|
continue;
|
|
3882
4054
|
case 4:
|
|
3883
|
-
if (tag
|
|
4055
|
+
if (tag !== 34) {
|
|
3884
4056
|
break;
|
|
3885
4057
|
}
|
|
3886
4058
|
message.newKey = reader.bytes();
|
|
3887
4059
|
continue;
|
|
3888
4060
|
case 5:
|
|
3889
|
-
if (tag
|
|
4061
|
+
if (tag !== 42) {
|
|
3890
4062
|
break;
|
|
3891
4063
|
}
|
|
3892
4064
|
message.weight = reader.string();
|
|
3893
4065
|
continue;
|
|
3894
4066
|
}
|
|
3895
|
-
if ((tag & 7)
|
|
4067
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3896
4068
|
break;
|
|
3897
4069
|
}
|
|
3898
4070
|
reader.skipType(tag & 7);
|
|
@@ -3902,19 +4074,29 @@ var RegisterKeyTx = {
|
|
|
3902
4074
|
fromJSON(object) {
|
|
3903
4075
|
return {
|
|
3904
4076
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3905
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
4077
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3906
4078
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
3907
|
-
newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(),
|
|
4079
|
+
newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(0),
|
|
3908
4080
|
weight: isSet(object.weight) ? String(object.weight) : ""
|
|
3909
4081
|
};
|
|
3910
4082
|
},
|
|
3911
4083
|
toJSON(message) {
|
|
3912
4084
|
const obj = {};
|
|
3913
|
-
message.nonce !==
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
4085
|
+
if (message.nonce !== 0) {
|
|
4086
|
+
obj.nonce = Math.round(message.nonce);
|
|
4087
|
+
}
|
|
4088
|
+
if (message.processId.length !== 0) {
|
|
4089
|
+
obj.processId = base64FromBytes(message.processId);
|
|
4090
|
+
}
|
|
4091
|
+
if (message.proof !== void 0) {
|
|
4092
|
+
obj.proof = Proof.toJSON(message.proof);
|
|
4093
|
+
}
|
|
4094
|
+
if (message.newKey.length !== 0) {
|
|
4095
|
+
obj.newKey = base64FromBytes(message.newKey);
|
|
4096
|
+
}
|
|
4097
|
+
if (message.weight !== "") {
|
|
4098
|
+
obj.weight = message.weight;
|
|
4099
|
+
}
|
|
3918
4100
|
return obj;
|
|
3919
4101
|
},
|
|
3920
4102
|
create(base) {
|
|
@@ -3923,15 +4105,15 @@ var RegisterKeyTx = {
|
|
|
3923
4105
|
fromPartial(object) {
|
|
3924
4106
|
const message = createBaseRegisterKeyTx();
|
|
3925
4107
|
message.nonce = object.nonce ?? 0;
|
|
3926
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
4108
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
3927
4109
|
message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
|
|
3928
|
-
message.newKey = object.newKey ?? new Uint8Array();
|
|
4110
|
+
message.newKey = object.newKey ?? new Uint8Array(0);
|
|
3929
4111
|
message.weight = object.weight ?? "";
|
|
3930
4112
|
return message;
|
|
3931
4113
|
}
|
|
3932
4114
|
};
|
|
3933
4115
|
function createBaseMintTokensTx() {
|
|
3934
|
-
return { txtype: 0, nonce: 0, to: new Uint8Array(), value: 0 };
|
|
4116
|
+
return { txtype: 0, nonce: 0, to: new Uint8Array(0), value: 0 };
|
|
3935
4117
|
}
|
|
3936
4118
|
var MintTokensTx = {
|
|
3937
4119
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -3957,31 +4139,31 @@ var MintTokensTx = {
|
|
|
3957
4139
|
const tag = reader.uint32();
|
|
3958
4140
|
switch (tag >>> 3) {
|
|
3959
4141
|
case 1:
|
|
3960
|
-
if (tag
|
|
4142
|
+
if (tag !== 8) {
|
|
3961
4143
|
break;
|
|
3962
4144
|
}
|
|
3963
4145
|
message.txtype = reader.int32();
|
|
3964
4146
|
continue;
|
|
3965
4147
|
case 2:
|
|
3966
|
-
if (tag
|
|
4148
|
+
if (tag !== 16) {
|
|
3967
4149
|
break;
|
|
3968
4150
|
}
|
|
3969
4151
|
message.nonce = reader.uint32();
|
|
3970
4152
|
continue;
|
|
3971
4153
|
case 3:
|
|
3972
|
-
if (tag
|
|
4154
|
+
if (tag !== 26) {
|
|
3973
4155
|
break;
|
|
3974
4156
|
}
|
|
3975
4157
|
message.to = reader.bytes();
|
|
3976
4158
|
continue;
|
|
3977
4159
|
case 4:
|
|
3978
|
-
if (tag
|
|
4160
|
+
if (tag !== 32) {
|
|
3979
4161
|
break;
|
|
3980
4162
|
}
|
|
3981
4163
|
message.value = longToNumber(reader.uint64());
|
|
3982
4164
|
continue;
|
|
3983
4165
|
}
|
|
3984
|
-
if ((tag & 7)
|
|
4166
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3985
4167
|
break;
|
|
3986
4168
|
}
|
|
3987
4169
|
reader.skipType(tag & 7);
|
|
@@ -3992,16 +4174,24 @@ var MintTokensTx = {
|
|
|
3992
4174
|
return {
|
|
3993
4175
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3994
4176
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3995
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4177
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
3996
4178
|
value: isSet(object.value) ? Number(object.value) : 0
|
|
3997
4179
|
};
|
|
3998
4180
|
},
|
|
3999
4181
|
toJSON(message) {
|
|
4000
4182
|
const obj = {};
|
|
4001
|
-
message.txtype !==
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
message.
|
|
4183
|
+
if (message.txtype !== 0) {
|
|
4184
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4185
|
+
}
|
|
4186
|
+
if (message.nonce !== 0) {
|
|
4187
|
+
obj.nonce = Math.round(message.nonce);
|
|
4188
|
+
}
|
|
4189
|
+
if (message.to.length !== 0) {
|
|
4190
|
+
obj.to = base64FromBytes(message.to);
|
|
4191
|
+
}
|
|
4192
|
+
if (message.value !== 0) {
|
|
4193
|
+
obj.value = Math.round(message.value);
|
|
4194
|
+
}
|
|
4005
4195
|
return obj;
|
|
4006
4196
|
},
|
|
4007
4197
|
create(base) {
|
|
@@ -4011,13 +4201,13 @@ var MintTokensTx = {
|
|
|
4011
4201
|
const message = createBaseMintTokensTx();
|
|
4012
4202
|
message.txtype = object.txtype ?? 0;
|
|
4013
4203
|
message.nonce = object.nonce ?? 0;
|
|
4014
|
-
message.to = object.to ?? new Uint8Array();
|
|
4204
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4015
4205
|
message.value = object.value ?? 0;
|
|
4016
4206
|
return message;
|
|
4017
4207
|
}
|
|
4018
4208
|
};
|
|
4019
4209
|
function createBaseSendTokensTx() {
|
|
4020
|
-
return { txtype: 0, nonce: 0, from: new Uint8Array(), to: new Uint8Array(), value: 0 };
|
|
4210
|
+
return { txtype: 0, nonce: 0, from: new Uint8Array(0), to: new Uint8Array(0), value: 0 };
|
|
4021
4211
|
}
|
|
4022
4212
|
var SendTokensTx = {
|
|
4023
4213
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4046,37 +4236,37 @@ var SendTokensTx = {
|
|
|
4046
4236
|
const tag = reader.uint32();
|
|
4047
4237
|
switch (tag >>> 3) {
|
|
4048
4238
|
case 1:
|
|
4049
|
-
if (tag
|
|
4239
|
+
if (tag !== 8) {
|
|
4050
4240
|
break;
|
|
4051
4241
|
}
|
|
4052
4242
|
message.txtype = reader.int32();
|
|
4053
4243
|
continue;
|
|
4054
4244
|
case 2:
|
|
4055
|
-
if (tag
|
|
4245
|
+
if (tag !== 16) {
|
|
4056
4246
|
break;
|
|
4057
4247
|
}
|
|
4058
4248
|
message.nonce = reader.uint32();
|
|
4059
4249
|
continue;
|
|
4060
4250
|
case 3:
|
|
4061
|
-
if (tag
|
|
4251
|
+
if (tag !== 26) {
|
|
4062
4252
|
break;
|
|
4063
4253
|
}
|
|
4064
4254
|
message.from = reader.bytes();
|
|
4065
4255
|
continue;
|
|
4066
4256
|
case 4:
|
|
4067
|
-
if (tag
|
|
4257
|
+
if (tag !== 34) {
|
|
4068
4258
|
break;
|
|
4069
4259
|
}
|
|
4070
4260
|
message.to = reader.bytes();
|
|
4071
4261
|
continue;
|
|
4072
4262
|
case 5:
|
|
4073
|
-
if (tag
|
|
4263
|
+
if (tag !== 40) {
|
|
4074
4264
|
break;
|
|
4075
4265
|
}
|
|
4076
4266
|
message.value = longToNumber(reader.uint64());
|
|
4077
4267
|
continue;
|
|
4078
4268
|
}
|
|
4079
|
-
if ((tag & 7)
|
|
4269
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4080
4270
|
break;
|
|
4081
4271
|
}
|
|
4082
4272
|
reader.skipType(tag & 7);
|
|
@@ -4087,18 +4277,28 @@ var SendTokensTx = {
|
|
|
4087
4277
|
return {
|
|
4088
4278
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4089
4279
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4090
|
-
from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(),
|
|
4091
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4280
|
+
from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(0),
|
|
4281
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4092
4282
|
value: isSet(object.value) ? Number(object.value) : 0
|
|
4093
4283
|
};
|
|
4094
4284
|
},
|
|
4095
4285
|
toJSON(message) {
|
|
4096
4286
|
const obj = {};
|
|
4097
|
-
message.txtype !==
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4287
|
+
if (message.txtype !== 0) {
|
|
4288
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4289
|
+
}
|
|
4290
|
+
if (message.nonce !== 0) {
|
|
4291
|
+
obj.nonce = Math.round(message.nonce);
|
|
4292
|
+
}
|
|
4293
|
+
if (message.from.length !== 0) {
|
|
4294
|
+
obj.from = base64FromBytes(message.from);
|
|
4295
|
+
}
|
|
4296
|
+
if (message.to.length !== 0) {
|
|
4297
|
+
obj.to = base64FromBytes(message.to);
|
|
4298
|
+
}
|
|
4299
|
+
if (message.value !== 0) {
|
|
4300
|
+
obj.value = Math.round(message.value);
|
|
4301
|
+
}
|
|
4102
4302
|
return obj;
|
|
4103
4303
|
},
|
|
4104
4304
|
create(base) {
|
|
@@ -4108,8 +4308,8 @@ var SendTokensTx = {
|
|
|
4108
4308
|
const message = createBaseSendTokensTx();
|
|
4109
4309
|
message.txtype = object.txtype ?? 0;
|
|
4110
4310
|
message.nonce = object.nonce ?? 0;
|
|
4111
|
-
message.from = object.from ?? new Uint8Array();
|
|
4112
|
-
message.to = object.to ?? new Uint8Array();
|
|
4311
|
+
message.from = object.from ?? new Uint8Array(0);
|
|
4312
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4113
4313
|
message.value = object.value ?? 0;
|
|
4114
4314
|
return message;
|
|
4115
4315
|
}
|
|
@@ -4138,25 +4338,25 @@ var SetTransactionCostsTx = {
|
|
|
4138
4338
|
const tag = reader.uint32();
|
|
4139
4339
|
switch (tag >>> 3) {
|
|
4140
4340
|
case 1:
|
|
4141
|
-
if (tag
|
|
4341
|
+
if (tag !== 8) {
|
|
4142
4342
|
break;
|
|
4143
4343
|
}
|
|
4144
4344
|
message.txtype = reader.int32();
|
|
4145
4345
|
continue;
|
|
4146
4346
|
case 2:
|
|
4147
|
-
if (tag
|
|
4347
|
+
if (tag !== 16) {
|
|
4148
4348
|
break;
|
|
4149
4349
|
}
|
|
4150
4350
|
message.nonce = reader.uint32();
|
|
4151
4351
|
continue;
|
|
4152
4352
|
case 3:
|
|
4153
|
-
if (tag
|
|
4353
|
+
if (tag !== 24) {
|
|
4154
4354
|
break;
|
|
4155
4355
|
}
|
|
4156
4356
|
message.value = longToNumber(reader.uint64());
|
|
4157
4357
|
continue;
|
|
4158
4358
|
}
|
|
4159
|
-
if ((tag & 7)
|
|
4359
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4160
4360
|
break;
|
|
4161
4361
|
}
|
|
4162
4362
|
reader.skipType(tag & 7);
|
|
@@ -4172,9 +4372,15 @@ var SetTransactionCostsTx = {
|
|
|
4172
4372
|
},
|
|
4173
4373
|
toJSON(message) {
|
|
4174
4374
|
const obj = {};
|
|
4175
|
-
message.txtype !==
|
|
4176
|
-
|
|
4177
|
-
|
|
4375
|
+
if (message.txtype !== 0) {
|
|
4376
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4377
|
+
}
|
|
4378
|
+
if (message.nonce !== 0) {
|
|
4379
|
+
obj.nonce = Math.round(message.nonce);
|
|
4380
|
+
}
|
|
4381
|
+
if (message.value !== 0) {
|
|
4382
|
+
obj.value = Math.round(message.value);
|
|
4383
|
+
}
|
|
4178
4384
|
return obj;
|
|
4179
4385
|
},
|
|
4180
4386
|
create(base) {
|
|
@@ -4195,7 +4401,8 @@ function createBaseSetAccountTx() {
|
|
|
4195
4401
|
infoURI: void 0,
|
|
4196
4402
|
account: void 0,
|
|
4197
4403
|
faucetPackage: void 0,
|
|
4198
|
-
delegates: []
|
|
4404
|
+
delegates: [],
|
|
4405
|
+
sik: void 0
|
|
4199
4406
|
};
|
|
4200
4407
|
}
|
|
4201
4408
|
var SetAccountTx = {
|
|
@@ -4218,6 +4425,9 @@ var SetAccountTx = {
|
|
|
4218
4425
|
for (const v of message.delegates) {
|
|
4219
4426
|
writer.uint32(50).bytes(v);
|
|
4220
4427
|
}
|
|
4428
|
+
if (message.sik !== void 0) {
|
|
4429
|
+
writer.uint32(58).bytes(message.sik);
|
|
4430
|
+
}
|
|
4221
4431
|
return writer;
|
|
4222
4432
|
},
|
|
4223
4433
|
decode(input, length) {
|
|
@@ -4228,43 +4438,49 @@ var SetAccountTx = {
|
|
|
4228
4438
|
const tag = reader.uint32();
|
|
4229
4439
|
switch (tag >>> 3) {
|
|
4230
4440
|
case 1:
|
|
4231
|
-
if (tag
|
|
4441
|
+
if (tag !== 8) {
|
|
4232
4442
|
break;
|
|
4233
4443
|
}
|
|
4234
4444
|
message.txtype = reader.int32();
|
|
4235
4445
|
continue;
|
|
4236
4446
|
case 2:
|
|
4237
|
-
if (tag
|
|
4447
|
+
if (tag !== 16) {
|
|
4238
4448
|
break;
|
|
4239
4449
|
}
|
|
4240
4450
|
message.nonce = reader.uint32();
|
|
4241
4451
|
continue;
|
|
4242
4452
|
case 3:
|
|
4243
|
-
if (tag
|
|
4453
|
+
if (tag !== 26) {
|
|
4244
4454
|
break;
|
|
4245
4455
|
}
|
|
4246
4456
|
message.infoURI = reader.string();
|
|
4247
4457
|
continue;
|
|
4248
4458
|
case 4:
|
|
4249
|
-
if (tag
|
|
4459
|
+
if (tag !== 34) {
|
|
4250
4460
|
break;
|
|
4251
4461
|
}
|
|
4252
4462
|
message.account = reader.bytes();
|
|
4253
4463
|
continue;
|
|
4254
4464
|
case 5:
|
|
4255
|
-
if (tag
|
|
4465
|
+
if (tag !== 42) {
|
|
4256
4466
|
break;
|
|
4257
4467
|
}
|
|
4258
4468
|
message.faucetPackage = FaucetPackage.decode(reader, reader.uint32());
|
|
4259
4469
|
continue;
|
|
4260
4470
|
case 6:
|
|
4261
|
-
if (tag
|
|
4471
|
+
if (tag !== 50) {
|
|
4262
4472
|
break;
|
|
4263
4473
|
}
|
|
4264
4474
|
message.delegates.push(reader.bytes());
|
|
4265
4475
|
continue;
|
|
4476
|
+
case 7:
|
|
4477
|
+
if (tag !== 58) {
|
|
4478
|
+
break;
|
|
4479
|
+
}
|
|
4480
|
+
message.sik = reader.bytes();
|
|
4481
|
+
continue;
|
|
4266
4482
|
}
|
|
4267
|
-
if ((tag & 7)
|
|
4483
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4268
4484
|
break;
|
|
4269
4485
|
}
|
|
4270
4486
|
reader.skipType(tag & 7);
|
|
@@ -4278,20 +4494,32 @@ var SetAccountTx = {
|
|
|
4278
4494
|
infoURI: isSet(object.infoURI) ? String(object.infoURI) : void 0,
|
|
4279
4495
|
account: isSet(object.account) ? bytesFromBase64(object.account) : void 0,
|
|
4280
4496
|
faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
|
|
4281
|
-
delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : []
|
|
4497
|
+
delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
|
|
4498
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : void 0
|
|
4282
4499
|
};
|
|
4283
4500
|
},
|
|
4284
4501
|
toJSON(message) {
|
|
4285
4502
|
const obj = {};
|
|
4286
|
-
message.txtype !==
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4503
|
+
if (message.txtype !== 0) {
|
|
4504
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4505
|
+
}
|
|
4506
|
+
if (message.nonce !== void 0) {
|
|
4507
|
+
obj.nonce = Math.round(message.nonce);
|
|
4508
|
+
}
|
|
4509
|
+
if (message.infoURI !== void 0) {
|
|
4510
|
+
obj.infoURI = message.infoURI;
|
|
4511
|
+
}
|
|
4512
|
+
if (message.account !== void 0) {
|
|
4513
|
+
obj.account = base64FromBytes(message.account);
|
|
4514
|
+
}
|
|
4515
|
+
if (message.faucetPackage !== void 0) {
|
|
4516
|
+
obj.faucetPackage = FaucetPackage.toJSON(message.faucetPackage);
|
|
4517
|
+
}
|
|
4518
|
+
if (message.delegates?.length) {
|
|
4519
|
+
obj.delegates = message.delegates.map((e) => base64FromBytes(e));
|
|
4520
|
+
}
|
|
4521
|
+
if (message.sik !== void 0) {
|
|
4522
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4295
4523
|
}
|
|
4296
4524
|
return obj;
|
|
4297
4525
|
},
|
|
@@ -4306,6 +4534,153 @@ var SetAccountTx = {
|
|
|
4306
4534
|
message.account = object.account ?? void 0;
|
|
4307
4535
|
message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
|
|
4308
4536
|
message.delegates = object.delegates?.map((e) => e) || [];
|
|
4537
|
+
message.sik = object.sik ?? void 0;
|
|
4538
|
+
return message;
|
|
4539
|
+
}
|
|
4540
|
+
};
|
|
4541
|
+
function createBaseSikTx() {
|
|
4542
|
+
return { txtype: 0, sik: void 0 };
|
|
4543
|
+
}
|
|
4544
|
+
var SikTx = {
|
|
4545
|
+
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4546
|
+
if (message.txtype !== 0) {
|
|
4547
|
+
writer.uint32(8).int32(message.txtype);
|
|
4548
|
+
}
|
|
4549
|
+
if (message.sik !== void 0) {
|
|
4550
|
+
writer.uint32(26).bytes(message.sik);
|
|
4551
|
+
}
|
|
4552
|
+
return writer;
|
|
4553
|
+
},
|
|
4554
|
+
decode(input, length) {
|
|
4555
|
+
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
4556
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4557
|
+
const message = createBaseSikTx();
|
|
4558
|
+
while (reader.pos < end) {
|
|
4559
|
+
const tag = reader.uint32();
|
|
4560
|
+
switch (tag >>> 3) {
|
|
4561
|
+
case 1:
|
|
4562
|
+
if (tag !== 8) {
|
|
4563
|
+
break;
|
|
4564
|
+
}
|
|
4565
|
+
message.txtype = reader.int32();
|
|
4566
|
+
continue;
|
|
4567
|
+
case 3:
|
|
4568
|
+
if (tag !== 26) {
|
|
4569
|
+
break;
|
|
4570
|
+
}
|
|
4571
|
+
message.sik = reader.bytes();
|
|
4572
|
+
continue;
|
|
4573
|
+
}
|
|
4574
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4575
|
+
break;
|
|
4576
|
+
}
|
|
4577
|
+
reader.skipType(tag & 7);
|
|
4578
|
+
}
|
|
4579
|
+
return message;
|
|
4580
|
+
},
|
|
4581
|
+
fromJSON(object) {
|
|
4582
|
+
return {
|
|
4583
|
+
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4584
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : void 0
|
|
4585
|
+
};
|
|
4586
|
+
},
|
|
4587
|
+
toJSON(message) {
|
|
4588
|
+
const obj = {};
|
|
4589
|
+
if (message.txtype !== 0) {
|
|
4590
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4591
|
+
}
|
|
4592
|
+
if (message.sik !== void 0) {
|
|
4593
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4594
|
+
}
|
|
4595
|
+
return obj;
|
|
4596
|
+
},
|
|
4597
|
+
create(base) {
|
|
4598
|
+
return SikTx.fromPartial(base ?? {});
|
|
4599
|
+
},
|
|
4600
|
+
fromPartial(object) {
|
|
4601
|
+
const message = createBaseSikTx();
|
|
4602
|
+
message.txtype = object.txtype ?? 0;
|
|
4603
|
+
message.sik = object.sik ?? void 0;
|
|
4604
|
+
return message;
|
|
4605
|
+
}
|
|
4606
|
+
};
|
|
4607
|
+
function createBaseRegisterSIKTx() {
|
|
4608
|
+
return { electionId: new Uint8Array(0), censusProof: void 0, sik: new Uint8Array(0) };
|
|
4609
|
+
}
|
|
4610
|
+
var RegisterSIKTx = {
|
|
4611
|
+
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4612
|
+
if (message.electionId.length !== 0) {
|
|
4613
|
+
writer.uint32(10).bytes(message.electionId);
|
|
4614
|
+
}
|
|
4615
|
+
if (message.censusProof !== void 0) {
|
|
4616
|
+
Proof.encode(message.censusProof, writer.uint32(18).fork()).ldelim();
|
|
4617
|
+
}
|
|
4618
|
+
if (message.sik.length !== 0) {
|
|
4619
|
+
writer.uint32(26).bytes(message.sik);
|
|
4620
|
+
}
|
|
4621
|
+
return writer;
|
|
4622
|
+
},
|
|
4623
|
+
decode(input, length) {
|
|
4624
|
+
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
4625
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4626
|
+
const message = createBaseRegisterSIKTx();
|
|
4627
|
+
while (reader.pos < end) {
|
|
4628
|
+
const tag = reader.uint32();
|
|
4629
|
+
switch (tag >>> 3) {
|
|
4630
|
+
case 1:
|
|
4631
|
+
if (tag !== 10) {
|
|
4632
|
+
break;
|
|
4633
|
+
}
|
|
4634
|
+
message.electionId = reader.bytes();
|
|
4635
|
+
continue;
|
|
4636
|
+
case 2:
|
|
4637
|
+
if (tag !== 18) {
|
|
4638
|
+
break;
|
|
4639
|
+
}
|
|
4640
|
+
message.censusProof = Proof.decode(reader, reader.uint32());
|
|
4641
|
+
continue;
|
|
4642
|
+
case 3:
|
|
4643
|
+
if (tag !== 26) {
|
|
4644
|
+
break;
|
|
4645
|
+
}
|
|
4646
|
+
message.sik = reader.bytes();
|
|
4647
|
+
continue;
|
|
4648
|
+
}
|
|
4649
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4650
|
+
break;
|
|
4651
|
+
}
|
|
4652
|
+
reader.skipType(tag & 7);
|
|
4653
|
+
}
|
|
4654
|
+
return message;
|
|
4655
|
+
},
|
|
4656
|
+
fromJSON(object) {
|
|
4657
|
+
return {
|
|
4658
|
+
electionId: isSet(object.electionId) ? bytesFromBase64(object.electionId) : new Uint8Array(0),
|
|
4659
|
+
censusProof: isSet(object.censusProof) ? Proof.fromJSON(object.censusProof) : void 0,
|
|
4660
|
+
sik: isSet(object.sik) ? bytesFromBase64(object.sik) : new Uint8Array(0)
|
|
4661
|
+
};
|
|
4662
|
+
},
|
|
4663
|
+
toJSON(message) {
|
|
4664
|
+
const obj = {};
|
|
4665
|
+
if (message.electionId.length !== 0) {
|
|
4666
|
+
obj.electionId = base64FromBytes(message.electionId);
|
|
4667
|
+
}
|
|
4668
|
+
if (message.censusProof !== void 0) {
|
|
4669
|
+
obj.censusProof = Proof.toJSON(message.censusProof);
|
|
4670
|
+
}
|
|
4671
|
+
if (message.sik.length !== 0) {
|
|
4672
|
+
obj.sik = base64FromBytes(message.sik);
|
|
4673
|
+
}
|
|
4674
|
+
return obj;
|
|
4675
|
+
},
|
|
4676
|
+
create(base) {
|
|
4677
|
+
return RegisterSIKTx.fromPartial(base ?? {});
|
|
4678
|
+
},
|
|
4679
|
+
fromPartial(object) {
|
|
4680
|
+
const message = createBaseRegisterSIKTx();
|
|
4681
|
+
message.electionId = object.electionId ?? new Uint8Array(0);
|
|
4682
|
+
message.censusProof = object.censusProof !== void 0 && object.censusProof !== null ? Proof.fromPartial(object.censusProof) : void 0;
|
|
4683
|
+
message.sik = object.sik ?? new Uint8Array(0);
|
|
4309
4684
|
return message;
|
|
4310
4685
|
}
|
|
4311
4686
|
};
|
|
@@ -4333,25 +4708,25 @@ var CollectFaucetTx = {
|
|
|
4333
4708
|
const tag = reader.uint32();
|
|
4334
4709
|
switch (tag >>> 3) {
|
|
4335
4710
|
case 1:
|
|
4336
|
-
if (tag
|
|
4711
|
+
if (tag !== 8) {
|
|
4337
4712
|
break;
|
|
4338
4713
|
}
|
|
4339
4714
|
message.txType = reader.int32();
|
|
4340
4715
|
continue;
|
|
4341
4716
|
case 2:
|
|
4342
|
-
if (tag
|
|
4717
|
+
if (tag !== 18) {
|
|
4343
4718
|
break;
|
|
4344
4719
|
}
|
|
4345
4720
|
message.faucetPackage = FaucetPackage.decode(reader, reader.uint32());
|
|
4346
4721
|
continue;
|
|
4347
4722
|
case 3:
|
|
4348
|
-
if (tag
|
|
4723
|
+
if (tag !== 24) {
|
|
4349
4724
|
break;
|
|
4350
4725
|
}
|
|
4351
4726
|
message.nonce = reader.uint32();
|
|
4352
4727
|
continue;
|
|
4353
4728
|
}
|
|
4354
|
-
if ((tag & 7)
|
|
4729
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4355
4730
|
break;
|
|
4356
4731
|
}
|
|
4357
4732
|
reader.skipType(tag & 7);
|
|
@@ -4367,9 +4742,15 @@ var CollectFaucetTx = {
|
|
|
4367
4742
|
},
|
|
4368
4743
|
toJSON(message) {
|
|
4369
4744
|
const obj = {};
|
|
4370
|
-
message.txType !==
|
|
4371
|
-
|
|
4372
|
-
|
|
4745
|
+
if (message.txType !== 0) {
|
|
4746
|
+
obj.txType = txTypeToJSON(message.txType);
|
|
4747
|
+
}
|
|
4748
|
+
if (message.faucetPackage !== void 0) {
|
|
4749
|
+
obj.faucetPackage = FaucetPackage.toJSON(message.faucetPackage);
|
|
4750
|
+
}
|
|
4751
|
+
if (message.nonce !== 0) {
|
|
4752
|
+
obj.nonce = Math.round(message.nonce);
|
|
4753
|
+
}
|
|
4373
4754
|
return obj;
|
|
4374
4755
|
},
|
|
4375
4756
|
create(base) {
|
|
@@ -4384,7 +4765,7 @@ var CollectFaucetTx = {
|
|
|
4384
4765
|
}
|
|
4385
4766
|
};
|
|
4386
4767
|
function createBaseFaucetPayload() {
|
|
4387
|
-
return { identifier: 0, to: new Uint8Array(), amount: 0 };
|
|
4768
|
+
return { identifier: 0, to: new Uint8Array(0), amount: 0 };
|
|
4388
4769
|
}
|
|
4389
4770
|
var FaucetPayload = {
|
|
4390
4771
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4407,25 +4788,25 @@ var FaucetPayload = {
|
|
|
4407
4788
|
const tag = reader.uint32();
|
|
4408
4789
|
switch (tag >>> 3) {
|
|
4409
4790
|
case 1:
|
|
4410
|
-
if (tag
|
|
4791
|
+
if (tag !== 8) {
|
|
4411
4792
|
break;
|
|
4412
4793
|
}
|
|
4413
4794
|
message.identifier = longToNumber(reader.uint64());
|
|
4414
4795
|
continue;
|
|
4415
4796
|
case 2:
|
|
4416
|
-
if (tag
|
|
4797
|
+
if (tag !== 18) {
|
|
4417
4798
|
break;
|
|
4418
4799
|
}
|
|
4419
4800
|
message.to = reader.bytes();
|
|
4420
4801
|
continue;
|
|
4421
4802
|
case 3:
|
|
4422
|
-
if (tag
|
|
4803
|
+
if (tag !== 24) {
|
|
4423
4804
|
break;
|
|
4424
4805
|
}
|
|
4425
4806
|
message.amount = longToNumber(reader.uint64());
|
|
4426
4807
|
continue;
|
|
4427
4808
|
}
|
|
4428
|
-
if ((tag & 7)
|
|
4809
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4429
4810
|
break;
|
|
4430
4811
|
}
|
|
4431
4812
|
reader.skipType(tag & 7);
|
|
@@ -4435,15 +4816,21 @@ var FaucetPayload = {
|
|
|
4435
4816
|
fromJSON(object) {
|
|
4436
4817
|
return {
|
|
4437
4818
|
identifier: isSet(object.identifier) ? Number(object.identifier) : 0,
|
|
4438
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(),
|
|
4819
|
+
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4439
4820
|
amount: isSet(object.amount) ? Number(object.amount) : 0
|
|
4440
4821
|
};
|
|
4441
4822
|
},
|
|
4442
4823
|
toJSON(message) {
|
|
4443
4824
|
const obj = {};
|
|
4444
|
-
message.identifier !==
|
|
4445
|
-
|
|
4446
|
-
|
|
4825
|
+
if (message.identifier !== 0) {
|
|
4826
|
+
obj.identifier = Math.round(message.identifier);
|
|
4827
|
+
}
|
|
4828
|
+
if (message.to.length !== 0) {
|
|
4829
|
+
obj.to = base64FromBytes(message.to);
|
|
4830
|
+
}
|
|
4831
|
+
if (message.amount !== 0) {
|
|
4832
|
+
obj.amount = Math.round(message.amount);
|
|
4833
|
+
}
|
|
4447
4834
|
return obj;
|
|
4448
4835
|
},
|
|
4449
4836
|
create(base) {
|
|
@@ -4452,13 +4839,13 @@ var FaucetPayload = {
|
|
|
4452
4839
|
fromPartial(object) {
|
|
4453
4840
|
const message = createBaseFaucetPayload();
|
|
4454
4841
|
message.identifier = object.identifier ?? 0;
|
|
4455
|
-
message.to = object.to ?? new Uint8Array();
|
|
4842
|
+
message.to = object.to ?? new Uint8Array(0);
|
|
4456
4843
|
message.amount = object.amount ?? 0;
|
|
4457
4844
|
return message;
|
|
4458
4845
|
}
|
|
4459
4846
|
};
|
|
4460
4847
|
function createBaseFaucetPackage() {
|
|
4461
|
-
return { payload: new Uint8Array(), signature: new Uint8Array() };
|
|
4848
|
+
return { payload: new Uint8Array(0), signature: new Uint8Array(0) };
|
|
4462
4849
|
}
|
|
4463
4850
|
var FaucetPackage = {
|
|
4464
4851
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4478,19 +4865,19 @@ var FaucetPackage = {
|
|
|
4478
4865
|
const tag = reader.uint32();
|
|
4479
4866
|
switch (tag >>> 3) {
|
|
4480
4867
|
case 1:
|
|
4481
|
-
if (tag
|
|
4868
|
+
if (tag !== 10) {
|
|
4482
4869
|
break;
|
|
4483
4870
|
}
|
|
4484
4871
|
message.payload = reader.bytes();
|
|
4485
4872
|
continue;
|
|
4486
4873
|
case 2:
|
|
4487
|
-
if (tag
|
|
4874
|
+
if (tag !== 18) {
|
|
4488
4875
|
break;
|
|
4489
4876
|
}
|
|
4490
4877
|
message.signature = reader.bytes();
|
|
4491
4878
|
continue;
|
|
4492
4879
|
}
|
|
4493
|
-
if ((tag & 7)
|
|
4880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4494
4881
|
break;
|
|
4495
4882
|
}
|
|
4496
4883
|
reader.skipType(tag & 7);
|
|
@@ -4499,14 +4886,18 @@ var FaucetPackage = {
|
|
|
4499
4886
|
},
|
|
4500
4887
|
fromJSON(object) {
|
|
4501
4888
|
return {
|
|
4502
|
-
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(),
|
|
4503
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array()
|
|
4889
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
|
|
4890
|
+
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0)
|
|
4504
4891
|
};
|
|
4505
4892
|
},
|
|
4506
4893
|
toJSON(message) {
|
|
4507
4894
|
const obj = {};
|
|
4508
|
-
|
|
4509
|
-
|
|
4895
|
+
if (message.payload.length !== 0) {
|
|
4896
|
+
obj.payload = base64FromBytes(message.payload);
|
|
4897
|
+
}
|
|
4898
|
+
if (message.signature.length !== 0) {
|
|
4899
|
+
obj.signature = base64FromBytes(message.signature);
|
|
4900
|
+
}
|
|
4510
4901
|
return obj;
|
|
4511
4902
|
},
|
|
4512
4903
|
create(base) {
|
|
@@ -4514,13 +4905,13 @@ var FaucetPackage = {
|
|
|
4514
4905
|
},
|
|
4515
4906
|
fromPartial(object) {
|
|
4516
4907
|
const message = createBaseFaucetPackage();
|
|
4517
|
-
message.payload = object.payload ?? new Uint8Array();
|
|
4518
|
-
message.signature = object.signature ?? new Uint8Array();
|
|
4908
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
4909
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
4519
4910
|
return message;
|
|
4520
4911
|
}
|
|
4521
4912
|
};
|
|
4522
4913
|
function createBaseSetKeykeeperTx() {
|
|
4523
|
-
return { txtype: 0, nonce: 0, keykeeper: new Uint8Array() };
|
|
4914
|
+
return { txtype: 0, nonce: 0, keykeeper: new Uint8Array(0) };
|
|
4524
4915
|
}
|
|
4525
4916
|
var SetKeykeeperTx = {
|
|
4526
4917
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -4543,25 +4934,25 @@ var SetKeykeeperTx = {
|
|
|
4543
4934
|
const tag = reader.uint32();
|
|
4544
4935
|
switch (tag >>> 3) {
|
|
4545
4936
|
case 1:
|
|
4546
|
-
if (tag
|
|
4937
|
+
if (tag !== 8) {
|
|
4547
4938
|
break;
|
|
4548
4939
|
}
|
|
4549
4940
|
message.txtype = reader.int32();
|
|
4550
4941
|
continue;
|
|
4551
4942
|
case 2:
|
|
4552
|
-
if (tag
|
|
4943
|
+
if (tag !== 16) {
|
|
4553
4944
|
break;
|
|
4554
4945
|
}
|
|
4555
4946
|
message.nonce = reader.uint32();
|
|
4556
4947
|
continue;
|
|
4557
4948
|
case 3:
|
|
4558
|
-
if (tag
|
|
4949
|
+
if (tag !== 26) {
|
|
4559
4950
|
break;
|
|
4560
4951
|
}
|
|
4561
4952
|
message.keykeeper = reader.bytes();
|
|
4562
4953
|
continue;
|
|
4563
4954
|
}
|
|
4564
|
-
if ((tag & 7)
|
|
4955
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4565
4956
|
break;
|
|
4566
4957
|
}
|
|
4567
4958
|
reader.skipType(tag & 7);
|
|
@@ -4572,14 +4963,20 @@ var SetKeykeeperTx = {
|
|
|
4572
4963
|
return {
|
|
4573
4964
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4574
4965
|
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4575
|
-
keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array()
|
|
4966
|
+
keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array(0)
|
|
4576
4967
|
};
|
|
4577
4968
|
},
|
|
4578
4969
|
toJSON(message) {
|
|
4579
4970
|
const obj = {};
|
|
4580
|
-
message.txtype !==
|
|
4581
|
-
|
|
4582
|
-
|
|
4971
|
+
if (message.txtype !== 0) {
|
|
4972
|
+
obj.txtype = txTypeToJSON(message.txtype);
|
|
4973
|
+
}
|
|
4974
|
+
if (message.nonce !== 0) {
|
|
4975
|
+
obj.nonce = Math.round(message.nonce);
|
|
4976
|
+
}
|
|
4977
|
+
if (message.keykeeper.length !== 0) {
|
|
4978
|
+
obj.keykeeper = base64FromBytes(message.keykeeper);
|
|
4979
|
+
}
|
|
4583
4980
|
return obj;
|
|
4584
4981
|
},
|
|
4585
4982
|
create(base) {
|
|
@@ -4589,17 +4986,17 @@ var SetKeykeeperTx = {
|
|
|
4589
4986
|
const message = createBaseSetKeykeeperTx();
|
|
4590
4987
|
message.txtype = object.txtype ?? 0;
|
|
4591
4988
|
message.nonce = object.nonce ?? 0;
|
|
4592
|
-
message.keykeeper = object.keykeeper ?? new Uint8Array();
|
|
4989
|
+
message.keykeeper = object.keykeeper ?? new Uint8Array(0);
|
|
4593
4990
|
return message;
|
|
4594
4991
|
}
|
|
4595
4992
|
};
|
|
4596
4993
|
function createBaseProcess() {
|
|
4597
4994
|
return {
|
|
4598
|
-
processId: new Uint8Array(),
|
|
4599
|
-
entityId: new Uint8Array(),
|
|
4995
|
+
processId: new Uint8Array(0),
|
|
4996
|
+
entityId: new Uint8Array(0),
|
|
4600
4997
|
startBlock: 0,
|
|
4601
4998
|
blockCount: 0,
|
|
4602
|
-
censusRoot: new Uint8Array(),
|
|
4999
|
+
censusRoot: new Uint8Array(0),
|
|
4603
5000
|
censusURI: void 0,
|
|
4604
5001
|
encryptionPrivateKeys: [],
|
|
4605
5002
|
encryptionPublicKeys: [],
|
|
@@ -4613,8 +5010,7 @@ function createBaseProcess() {
|
|
|
4613
5010
|
questionCount: void 0,
|
|
4614
5011
|
voteOptions: void 0,
|
|
4615
5012
|
censusOrigin: 0,
|
|
4616
|
-
results:
|
|
4617
|
-
resultsSignatures: [],
|
|
5013
|
+
results: void 0,
|
|
4618
5014
|
ethIndexSlot: void 0,
|
|
4619
5015
|
sourceBlockHeight: void 0,
|
|
4620
5016
|
owner: void 0,
|
|
@@ -4684,11 +5080,8 @@ var Process = {
|
|
|
4684
5080
|
if (message.censusOrigin !== 0) {
|
|
4685
5081
|
writer.uint32(160).int32(message.censusOrigin);
|
|
4686
5082
|
}
|
|
4687
|
-
|
|
4688
|
-
ProcessResult.encode(
|
|
4689
|
-
}
|
|
4690
|
-
for (const v of message.resultsSignatures) {
|
|
4691
|
-
writer.uint32(178).bytes(v);
|
|
5083
|
+
if (message.results !== void 0) {
|
|
5084
|
+
ProcessResult.encode(message.results, writer.uint32(170).fork()).ldelim();
|
|
4692
5085
|
}
|
|
4693
5086
|
if (message.ethIndexSlot !== void 0) {
|
|
4694
5087
|
writer.uint32(184).uint32(message.ethIndexSlot);
|
|
@@ -4733,193 +5126,187 @@ var Process = {
|
|
|
4733
5126
|
const tag = reader.uint32();
|
|
4734
5127
|
switch (tag >>> 3) {
|
|
4735
5128
|
case 1:
|
|
4736
|
-
if (tag
|
|
5129
|
+
if (tag !== 10) {
|
|
4737
5130
|
break;
|
|
4738
5131
|
}
|
|
4739
5132
|
message.processId = reader.bytes();
|
|
4740
5133
|
continue;
|
|
4741
5134
|
case 2:
|
|
4742
|
-
if (tag
|
|
5135
|
+
if (tag !== 18) {
|
|
4743
5136
|
break;
|
|
4744
5137
|
}
|
|
4745
5138
|
message.entityId = reader.bytes();
|
|
4746
5139
|
continue;
|
|
4747
5140
|
case 3:
|
|
4748
|
-
if (tag
|
|
5141
|
+
if (tag !== 24) {
|
|
4749
5142
|
break;
|
|
4750
5143
|
}
|
|
4751
5144
|
message.startBlock = reader.uint32();
|
|
4752
5145
|
continue;
|
|
4753
5146
|
case 4:
|
|
4754
|
-
if (tag
|
|
5147
|
+
if (tag !== 32) {
|
|
4755
5148
|
break;
|
|
4756
5149
|
}
|
|
4757
5150
|
message.blockCount = reader.uint32();
|
|
4758
5151
|
continue;
|
|
4759
5152
|
case 5:
|
|
4760
|
-
if (tag
|
|
5153
|
+
if (tag !== 42) {
|
|
4761
5154
|
break;
|
|
4762
5155
|
}
|
|
4763
5156
|
message.censusRoot = reader.bytes();
|
|
4764
5157
|
continue;
|
|
4765
5158
|
case 6:
|
|
4766
|
-
if (tag
|
|
5159
|
+
if (tag !== 50) {
|
|
4767
5160
|
break;
|
|
4768
5161
|
}
|
|
4769
5162
|
message.censusURI = reader.string();
|
|
4770
5163
|
continue;
|
|
4771
5164
|
case 8:
|
|
4772
|
-
if (tag
|
|
5165
|
+
if (tag !== 66) {
|
|
4773
5166
|
break;
|
|
4774
5167
|
}
|
|
4775
5168
|
message.encryptionPrivateKeys.push(reader.string());
|
|
4776
5169
|
continue;
|
|
4777
5170
|
case 9:
|
|
4778
|
-
if (tag
|
|
5171
|
+
if (tag !== 74) {
|
|
4779
5172
|
break;
|
|
4780
5173
|
}
|
|
4781
5174
|
message.encryptionPublicKeys.push(reader.string());
|
|
4782
5175
|
continue;
|
|
4783
5176
|
case 11:
|
|
4784
|
-
if (tag
|
|
5177
|
+
if (tag !== 88) {
|
|
4785
5178
|
break;
|
|
4786
5179
|
}
|
|
4787
5180
|
message.keyIndex = reader.uint32();
|
|
4788
5181
|
continue;
|
|
4789
5182
|
case 12:
|
|
4790
|
-
if (tag
|
|
5183
|
+
if (tag !== 96) {
|
|
4791
5184
|
break;
|
|
4792
5185
|
}
|
|
4793
5186
|
message.status = reader.int32();
|
|
4794
5187
|
continue;
|
|
4795
5188
|
case 13:
|
|
4796
|
-
if (tag
|
|
5189
|
+
if (tag !== 106) {
|
|
4797
5190
|
break;
|
|
4798
5191
|
}
|
|
4799
5192
|
message.paramsSignature = reader.bytes();
|
|
4800
5193
|
continue;
|
|
4801
5194
|
case 14:
|
|
4802
|
-
if (tag
|
|
5195
|
+
if (tag !== 112) {
|
|
4803
5196
|
break;
|
|
4804
5197
|
}
|
|
4805
5198
|
message.namespace = reader.uint32();
|
|
4806
5199
|
continue;
|
|
4807
5200
|
case 15:
|
|
4808
|
-
if (tag
|
|
5201
|
+
if (tag !== 122) {
|
|
4809
5202
|
break;
|
|
4810
5203
|
}
|
|
4811
5204
|
message.envelopeType = EnvelopeType.decode(reader, reader.uint32());
|
|
4812
5205
|
continue;
|
|
4813
5206
|
case 16:
|
|
4814
|
-
if (tag
|
|
5207
|
+
if (tag !== 130) {
|
|
4815
5208
|
break;
|
|
4816
5209
|
}
|
|
4817
5210
|
message.mode = ProcessMode.decode(reader, reader.uint32());
|
|
4818
5211
|
continue;
|
|
4819
5212
|
case 17:
|
|
4820
|
-
if (tag
|
|
5213
|
+
if (tag !== 136) {
|
|
4821
5214
|
break;
|
|
4822
5215
|
}
|
|
4823
5216
|
message.questionIndex = reader.uint32();
|
|
4824
5217
|
continue;
|
|
4825
5218
|
case 18:
|
|
4826
|
-
if (tag
|
|
5219
|
+
if (tag !== 144) {
|
|
4827
5220
|
break;
|
|
4828
5221
|
}
|
|
4829
5222
|
message.questionCount = reader.uint32();
|
|
4830
5223
|
continue;
|
|
4831
5224
|
case 19:
|
|
4832
|
-
if (tag
|
|
5225
|
+
if (tag !== 154) {
|
|
4833
5226
|
break;
|
|
4834
5227
|
}
|
|
4835
5228
|
message.voteOptions = ProcessVoteOptions.decode(reader, reader.uint32());
|
|
4836
5229
|
continue;
|
|
4837
5230
|
case 20:
|
|
4838
|
-
if (tag
|
|
5231
|
+
if (tag !== 160) {
|
|
4839
5232
|
break;
|
|
4840
5233
|
}
|
|
4841
5234
|
message.censusOrigin = reader.int32();
|
|
4842
5235
|
continue;
|
|
4843
5236
|
case 21:
|
|
4844
|
-
if (tag
|
|
4845
|
-
break;
|
|
4846
|
-
}
|
|
4847
|
-
message.results.push(ProcessResult.decode(reader, reader.uint32()));
|
|
4848
|
-
continue;
|
|
4849
|
-
case 22:
|
|
4850
|
-
if (tag != 178) {
|
|
5237
|
+
if (tag !== 170) {
|
|
4851
5238
|
break;
|
|
4852
5239
|
}
|
|
4853
|
-
message.
|
|
5240
|
+
message.results = ProcessResult.decode(reader, reader.uint32());
|
|
4854
5241
|
continue;
|
|
4855
5242
|
case 23:
|
|
4856
|
-
if (tag
|
|
5243
|
+
if (tag !== 184) {
|
|
4857
5244
|
break;
|
|
4858
5245
|
}
|
|
4859
5246
|
message.ethIndexSlot = reader.uint32();
|
|
4860
5247
|
continue;
|
|
4861
5248
|
case 24:
|
|
4862
|
-
if (tag
|
|
5249
|
+
if (tag !== 192) {
|
|
4863
5250
|
break;
|
|
4864
5251
|
}
|
|
4865
5252
|
message.sourceBlockHeight = longToNumber(reader.uint64());
|
|
4866
5253
|
continue;
|
|
4867
5254
|
case 25:
|
|
4868
|
-
if (tag
|
|
5255
|
+
if (tag !== 202) {
|
|
4869
5256
|
break;
|
|
4870
5257
|
}
|
|
4871
5258
|
message.owner = reader.bytes();
|
|
4872
5259
|
continue;
|
|
4873
5260
|
case 26:
|
|
4874
|
-
if (tag
|
|
5261
|
+
if (tag !== 210) {
|
|
4875
5262
|
break;
|
|
4876
5263
|
}
|
|
4877
5264
|
message.metadata = reader.string();
|
|
4878
5265
|
continue;
|
|
4879
5266
|
case 27:
|
|
4880
|
-
if (tag
|
|
5267
|
+
if (tag !== 216) {
|
|
4881
5268
|
break;
|
|
4882
5269
|
}
|
|
4883
5270
|
message.sourceNetworkId = reader.int32();
|
|
4884
5271
|
continue;
|
|
4885
5272
|
case 28:
|
|
4886
|
-
if (tag
|
|
5273
|
+
if (tag !== 224) {
|
|
4887
5274
|
break;
|
|
4888
5275
|
}
|
|
4889
5276
|
message.maxCensusSize = longToNumber(reader.uint64());
|
|
4890
5277
|
continue;
|
|
4891
5278
|
case 29:
|
|
4892
|
-
if (tag
|
|
5279
|
+
if (tag !== 234) {
|
|
4893
5280
|
break;
|
|
4894
5281
|
}
|
|
4895
5282
|
message.rollingCensusRoot = reader.bytes();
|
|
4896
5283
|
continue;
|
|
4897
5284
|
case 30:
|
|
4898
|
-
if (tag
|
|
5285
|
+
if (tag !== 240) {
|
|
4899
5286
|
break;
|
|
4900
5287
|
}
|
|
4901
5288
|
message.rollingCensusSize = longToNumber(reader.uint64());
|
|
4902
5289
|
continue;
|
|
4903
5290
|
case 31:
|
|
4904
|
-
if (tag
|
|
5291
|
+
if (tag !== 250) {
|
|
4905
5292
|
break;
|
|
4906
5293
|
}
|
|
4907
5294
|
message.nullifiersRoot = reader.bytes();
|
|
4908
5295
|
continue;
|
|
4909
5296
|
case 32:
|
|
4910
|
-
if (tag
|
|
5297
|
+
if (tag !== 258) {
|
|
4911
5298
|
break;
|
|
4912
5299
|
}
|
|
4913
5300
|
message.sourceNetworkContractAddr = reader.bytes();
|
|
4914
5301
|
continue;
|
|
4915
5302
|
case 33:
|
|
4916
|
-
if (tag
|
|
5303
|
+
if (tag !== 264) {
|
|
4917
5304
|
break;
|
|
4918
5305
|
}
|
|
4919
5306
|
message.tokenDecimals = reader.uint32();
|
|
4920
5307
|
continue;
|
|
4921
5308
|
}
|
|
4922
|
-
if ((tag & 7)
|
|
5309
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4923
5310
|
break;
|
|
4924
5311
|
}
|
|
4925
5312
|
reader.skipType(tag & 7);
|
|
@@ -4928,11 +5315,11 @@ var Process = {
|
|
|
4928
5315
|
},
|
|
4929
5316
|
fromJSON(object) {
|
|
4930
5317
|
return {
|
|
4931
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(),
|
|
4932
|
-
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(),
|
|
5318
|
+
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
5319
|
+
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(0),
|
|
4933
5320
|
startBlock: isSet(object.startBlock) ? Number(object.startBlock) : 0,
|
|
4934
5321
|
blockCount: isSet(object.blockCount) ? Number(object.blockCount) : 0,
|
|
4935
|
-
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(),
|
|
5322
|
+
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(0),
|
|
4936
5323
|
censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
|
|
4937
5324
|
encryptionPrivateKeys: Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => String(e)) : [],
|
|
4938
5325
|
encryptionPublicKeys: Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => String(e)) : [],
|
|
@@ -4946,8 +5333,7 @@ var Process = {
|
|
|
4946
5333
|
questionCount: isSet(object.questionCount) ? Number(object.questionCount) : void 0,
|
|
4947
5334
|
voteOptions: isSet(object.voteOptions) ? ProcessVoteOptions.fromJSON(object.voteOptions) : void 0,
|
|
4948
5335
|
censusOrigin: isSet(object.censusOrigin) ? censusOriginFromJSON(object.censusOrigin) : 0,
|
|
4949
|
-
results:
|
|
4950
|
-
resultsSignatures: Array.isArray(object?.resultsSignatures) ? object.resultsSignatures.map((e) => bytesFromBase64(e)) : [],
|
|
5336
|
+
results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
|
|
4951
5337
|
ethIndexSlot: isSet(object.ethIndexSlot) ? Number(object.ethIndexSlot) : void 0,
|
|
4952
5338
|
sourceBlockHeight: isSet(object.sourceBlockHeight) ? Number(object.sourceBlockHeight) : void 0,
|
|
4953
5339
|
owner: isSet(object.owner) ? bytesFromBase64(object.owner) : void 0,
|
|
@@ -4963,55 +5349,96 @@ var Process = {
|
|
|
4963
5349
|
},
|
|
4964
5350
|
toJSON(message) {
|
|
4965
5351
|
const obj = {};
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
message.
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
if (message.
|
|
4973
|
-
obj.
|
|
4974
|
-
}
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
message.
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
);
|
|
5001
|
-
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
message.
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
message.
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
message.
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
message.
|
|
5352
|
+
if (message.processId.length !== 0) {
|
|
5353
|
+
obj.processId = base64FromBytes(message.processId);
|
|
5354
|
+
}
|
|
5355
|
+
if (message.entityId.length !== 0) {
|
|
5356
|
+
obj.entityId = base64FromBytes(message.entityId);
|
|
5357
|
+
}
|
|
5358
|
+
if (message.startBlock !== 0) {
|
|
5359
|
+
obj.startBlock = Math.round(message.startBlock);
|
|
5360
|
+
}
|
|
5361
|
+
if (message.blockCount !== 0) {
|
|
5362
|
+
obj.blockCount = Math.round(message.blockCount);
|
|
5363
|
+
}
|
|
5364
|
+
if (message.censusRoot.length !== 0) {
|
|
5365
|
+
obj.censusRoot = base64FromBytes(message.censusRoot);
|
|
5366
|
+
}
|
|
5367
|
+
if (message.censusURI !== void 0) {
|
|
5368
|
+
obj.censusURI = message.censusURI;
|
|
5369
|
+
}
|
|
5370
|
+
if (message.encryptionPrivateKeys?.length) {
|
|
5371
|
+
obj.encryptionPrivateKeys = message.encryptionPrivateKeys;
|
|
5372
|
+
}
|
|
5373
|
+
if (message.encryptionPublicKeys?.length) {
|
|
5374
|
+
obj.encryptionPublicKeys = message.encryptionPublicKeys;
|
|
5375
|
+
}
|
|
5376
|
+
if (message.keyIndex !== void 0) {
|
|
5377
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
5378
|
+
}
|
|
5379
|
+
if (message.status !== 0) {
|
|
5380
|
+
obj.status = processStatusToJSON(message.status);
|
|
5381
|
+
}
|
|
5382
|
+
if (message.paramsSignature !== void 0) {
|
|
5383
|
+
obj.paramsSignature = base64FromBytes(message.paramsSignature);
|
|
5384
|
+
}
|
|
5385
|
+
if (message.namespace !== 0) {
|
|
5386
|
+
obj.namespace = Math.round(message.namespace);
|
|
5387
|
+
}
|
|
5388
|
+
if (message.envelopeType !== void 0) {
|
|
5389
|
+
obj.envelopeType = EnvelopeType.toJSON(message.envelopeType);
|
|
5390
|
+
}
|
|
5391
|
+
if (message.mode !== void 0) {
|
|
5392
|
+
obj.mode = ProcessMode.toJSON(message.mode);
|
|
5393
|
+
}
|
|
5394
|
+
if (message.questionIndex !== void 0) {
|
|
5395
|
+
obj.questionIndex = Math.round(message.questionIndex);
|
|
5396
|
+
}
|
|
5397
|
+
if (message.questionCount !== void 0) {
|
|
5398
|
+
obj.questionCount = Math.round(message.questionCount);
|
|
5399
|
+
}
|
|
5400
|
+
if (message.voteOptions !== void 0) {
|
|
5401
|
+
obj.voteOptions = ProcessVoteOptions.toJSON(message.voteOptions);
|
|
5402
|
+
}
|
|
5403
|
+
if (message.censusOrigin !== 0) {
|
|
5404
|
+
obj.censusOrigin = censusOriginToJSON(message.censusOrigin);
|
|
5405
|
+
}
|
|
5406
|
+
if (message.results !== void 0) {
|
|
5407
|
+
obj.results = ProcessResult.toJSON(message.results);
|
|
5408
|
+
}
|
|
5409
|
+
if (message.ethIndexSlot !== void 0) {
|
|
5410
|
+
obj.ethIndexSlot = Math.round(message.ethIndexSlot);
|
|
5411
|
+
}
|
|
5412
|
+
if (message.sourceBlockHeight !== void 0) {
|
|
5413
|
+
obj.sourceBlockHeight = Math.round(message.sourceBlockHeight);
|
|
5414
|
+
}
|
|
5415
|
+
if (message.owner !== void 0) {
|
|
5416
|
+
obj.owner = base64FromBytes(message.owner);
|
|
5417
|
+
}
|
|
5418
|
+
if (message.metadata !== void 0) {
|
|
5419
|
+
obj.metadata = message.metadata;
|
|
5420
|
+
}
|
|
5421
|
+
if (message.sourceNetworkId !== 0) {
|
|
5422
|
+
obj.sourceNetworkId = sourceNetworkIdToJSON(message.sourceNetworkId);
|
|
5423
|
+
}
|
|
5424
|
+
if (message.maxCensusSize !== 0) {
|
|
5425
|
+
obj.maxCensusSize = Math.round(message.maxCensusSize);
|
|
5426
|
+
}
|
|
5427
|
+
if (message.rollingCensusRoot !== void 0) {
|
|
5428
|
+
obj.rollingCensusRoot = base64FromBytes(message.rollingCensusRoot);
|
|
5429
|
+
}
|
|
5430
|
+
if (message.rollingCensusSize !== void 0) {
|
|
5431
|
+
obj.rollingCensusSize = Math.round(message.rollingCensusSize);
|
|
5432
|
+
}
|
|
5433
|
+
if (message.nullifiersRoot !== void 0) {
|
|
5434
|
+
obj.nullifiersRoot = base64FromBytes(message.nullifiersRoot);
|
|
5435
|
+
}
|
|
5436
|
+
if (message.sourceNetworkContractAddr !== void 0) {
|
|
5437
|
+
obj.sourceNetworkContractAddr = base64FromBytes(message.sourceNetworkContractAddr);
|
|
5438
|
+
}
|
|
5439
|
+
if (message.tokenDecimals !== void 0) {
|
|
5440
|
+
obj.tokenDecimals = Math.round(message.tokenDecimals);
|
|
5441
|
+
}
|
|
5015
5442
|
return obj;
|
|
5016
5443
|
},
|
|
5017
5444
|
create(base) {
|
|
@@ -5019,11 +5446,11 @@ var Process = {
|
|
|
5019
5446
|
},
|
|
5020
5447
|
fromPartial(object) {
|
|
5021
5448
|
const message = createBaseProcess();
|
|
5022
|
-
message.processId = object.processId ?? new Uint8Array();
|
|
5023
|
-
message.entityId = object.entityId ?? new Uint8Array();
|
|
5449
|
+
message.processId = object.processId ?? new Uint8Array(0);
|
|
5450
|
+
message.entityId = object.entityId ?? new Uint8Array(0);
|
|
5024
5451
|
message.startBlock = object.startBlock ?? 0;
|
|
5025
5452
|
message.blockCount = object.blockCount ?? 0;
|
|
5026
|
-
message.censusRoot = object.censusRoot ?? new Uint8Array();
|
|
5453
|
+
message.censusRoot = object.censusRoot ?? new Uint8Array(0);
|
|
5027
5454
|
message.censusURI = object.censusURI ?? void 0;
|
|
5028
5455
|
message.encryptionPrivateKeys = object.encryptionPrivateKeys?.map((e) => e) || [];
|
|
5029
5456
|
message.encryptionPublicKeys = object.encryptionPublicKeys?.map((e) => e) || [];
|
|
@@ -5037,8 +5464,7 @@ var Process = {
|
|
|
5037
5464
|
message.questionCount = object.questionCount ?? void 0;
|
|
5038
5465
|
message.voteOptions = object.voteOptions !== void 0 && object.voteOptions !== null ? ProcessVoteOptions.fromPartial(object.voteOptions) : void 0;
|
|
5039
5466
|
message.censusOrigin = object.censusOrigin ?? 0;
|
|
5040
|
-
message.results = object.results
|
|
5041
|
-
message.resultsSignatures = object.resultsSignatures?.map((e) => e) || [];
|
|
5467
|
+
message.results = object.results !== void 0 && object.results !== null ? ProcessResult.fromPartial(object.results) : void 0;
|
|
5042
5468
|
message.ethIndexSlot = object.ethIndexSlot ?? void 0;
|
|
5043
5469
|
message.sourceBlockHeight = object.sourceBlockHeight ?? void 0;
|
|
5044
5470
|
message.owner = object.owner ?? void 0;
|
|
@@ -5083,37 +5509,37 @@ var EnvelopeType = {
|
|
|
5083
5509
|
const tag = reader.uint32();
|
|
5084
5510
|
switch (tag >>> 3) {
|
|
5085
5511
|
case 1:
|
|
5086
|
-
if (tag
|
|
5512
|
+
if (tag !== 8) {
|
|
5087
5513
|
break;
|
|
5088
5514
|
}
|
|
5089
5515
|
message.serial = reader.bool();
|
|
5090
5516
|
continue;
|
|
5091
5517
|
case 2:
|
|
5092
|
-
if (tag
|
|
5518
|
+
if (tag !== 16) {
|
|
5093
5519
|
break;
|
|
5094
5520
|
}
|
|
5095
5521
|
message.anonymous = reader.bool();
|
|
5096
5522
|
continue;
|
|
5097
5523
|
case 3:
|
|
5098
|
-
if (tag
|
|
5524
|
+
if (tag !== 24) {
|
|
5099
5525
|
break;
|
|
5100
5526
|
}
|
|
5101
5527
|
message.encryptedVotes = reader.bool();
|
|
5102
5528
|
continue;
|
|
5103
5529
|
case 4:
|
|
5104
|
-
if (tag
|
|
5530
|
+
if (tag !== 32) {
|
|
5105
5531
|
break;
|
|
5106
5532
|
}
|
|
5107
5533
|
message.uniqueValues = reader.bool();
|
|
5108
5534
|
continue;
|
|
5109
5535
|
case 5:
|
|
5110
|
-
if (tag
|
|
5536
|
+
if (tag !== 40) {
|
|
5111
5537
|
break;
|
|
5112
5538
|
}
|
|
5113
5539
|
message.costFromWeight = reader.bool();
|
|
5114
5540
|
continue;
|
|
5115
5541
|
}
|
|
5116
|
-
if ((tag & 7)
|
|
5542
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5117
5543
|
break;
|
|
5118
5544
|
}
|
|
5119
5545
|
reader.skipType(tag & 7);
|
|
@@ -5131,11 +5557,21 @@ var EnvelopeType = {
|
|
|
5131
5557
|
},
|
|
5132
5558
|
toJSON(message) {
|
|
5133
5559
|
const obj = {};
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5560
|
+
if (message.serial === true) {
|
|
5561
|
+
obj.serial = message.serial;
|
|
5562
|
+
}
|
|
5563
|
+
if (message.anonymous === true) {
|
|
5564
|
+
obj.anonymous = message.anonymous;
|
|
5565
|
+
}
|
|
5566
|
+
if (message.encryptedVotes === true) {
|
|
5567
|
+
obj.encryptedVotes = message.encryptedVotes;
|
|
5568
|
+
}
|
|
5569
|
+
if (message.uniqueValues === true) {
|
|
5570
|
+
obj.uniqueValues = message.uniqueValues;
|
|
5571
|
+
}
|
|
5572
|
+
if (message.costFromWeight === true) {
|
|
5573
|
+
obj.costFromWeight = message.costFromWeight;
|
|
5574
|
+
}
|
|
5139
5575
|
return obj;
|
|
5140
5576
|
},
|
|
5141
5577
|
create(base) {
|
|
@@ -5181,37 +5617,37 @@ var ProcessMode = {
|
|
|
5181
5617
|
const tag = reader.uint32();
|
|
5182
5618
|
switch (tag >>> 3) {
|
|
5183
5619
|
case 1:
|
|
5184
|
-
if (tag
|
|
5620
|
+
if (tag !== 8) {
|
|
5185
5621
|
break;
|
|
5186
5622
|
}
|
|
5187
5623
|
message.autoStart = reader.bool();
|
|
5188
5624
|
continue;
|
|
5189
5625
|
case 2:
|
|
5190
|
-
if (tag
|
|
5626
|
+
if (tag !== 16) {
|
|
5191
5627
|
break;
|
|
5192
5628
|
}
|
|
5193
5629
|
message.interruptible = reader.bool();
|
|
5194
5630
|
continue;
|
|
5195
5631
|
case 3:
|
|
5196
|
-
if (tag
|
|
5632
|
+
if (tag !== 24) {
|
|
5197
5633
|
break;
|
|
5198
5634
|
}
|
|
5199
5635
|
message.dynamicCensus = reader.bool();
|
|
5200
5636
|
continue;
|
|
5201
5637
|
case 4:
|
|
5202
|
-
if (tag
|
|
5638
|
+
if (tag !== 32) {
|
|
5203
5639
|
break;
|
|
5204
5640
|
}
|
|
5205
5641
|
message.encryptedMetaData = reader.bool();
|
|
5206
5642
|
continue;
|
|
5207
5643
|
case 5:
|
|
5208
|
-
if (tag
|
|
5644
|
+
if (tag !== 40) {
|
|
5209
5645
|
break;
|
|
5210
5646
|
}
|
|
5211
5647
|
message.preRegister = reader.bool();
|
|
5212
5648
|
continue;
|
|
5213
5649
|
}
|
|
5214
|
-
if ((tag & 7)
|
|
5650
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5215
5651
|
break;
|
|
5216
5652
|
}
|
|
5217
5653
|
reader.skipType(tag & 7);
|
|
@@ -5229,11 +5665,21 @@ var ProcessMode = {
|
|
|
5229
5665
|
},
|
|
5230
5666
|
toJSON(message) {
|
|
5231
5667
|
const obj = {};
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5668
|
+
if (message.autoStart === true) {
|
|
5669
|
+
obj.autoStart = message.autoStart;
|
|
5670
|
+
}
|
|
5671
|
+
if (message.interruptible === true) {
|
|
5672
|
+
obj.interruptible = message.interruptible;
|
|
5673
|
+
}
|
|
5674
|
+
if (message.dynamicCensus === true) {
|
|
5675
|
+
obj.dynamicCensus = message.dynamicCensus;
|
|
5676
|
+
}
|
|
5677
|
+
if (message.encryptedMetaData === true) {
|
|
5678
|
+
obj.encryptedMetaData = message.encryptedMetaData;
|
|
5679
|
+
}
|
|
5680
|
+
if (message.preRegister === true) {
|
|
5681
|
+
obj.preRegister = message.preRegister;
|
|
5682
|
+
}
|
|
5237
5683
|
return obj;
|
|
5238
5684
|
},
|
|
5239
5685
|
create(base) {
|
|
@@ -5279,37 +5725,37 @@ var ProcessVoteOptions = {
|
|
|
5279
5725
|
const tag = reader.uint32();
|
|
5280
5726
|
switch (tag >>> 3) {
|
|
5281
5727
|
case 1:
|
|
5282
|
-
if (tag
|
|
5728
|
+
if (tag !== 8) {
|
|
5283
5729
|
break;
|
|
5284
5730
|
}
|
|
5285
5731
|
message.maxCount = reader.uint32();
|
|
5286
5732
|
continue;
|
|
5287
5733
|
case 2:
|
|
5288
|
-
if (tag
|
|
5734
|
+
if (tag !== 16) {
|
|
5289
5735
|
break;
|
|
5290
5736
|
}
|
|
5291
5737
|
message.maxValue = reader.uint32();
|
|
5292
5738
|
continue;
|
|
5293
5739
|
case 3:
|
|
5294
|
-
if (tag
|
|
5740
|
+
if (tag !== 24) {
|
|
5295
5741
|
break;
|
|
5296
5742
|
}
|
|
5297
5743
|
message.maxVoteOverwrites = reader.uint32();
|
|
5298
5744
|
continue;
|
|
5299
5745
|
case 4:
|
|
5300
|
-
if (tag
|
|
5746
|
+
if (tag !== 32) {
|
|
5301
5747
|
break;
|
|
5302
5748
|
}
|
|
5303
5749
|
message.maxTotalCost = reader.uint32();
|
|
5304
5750
|
continue;
|
|
5305
5751
|
case 5:
|
|
5306
|
-
if (tag
|
|
5752
|
+
if (tag !== 40) {
|
|
5307
5753
|
break;
|
|
5308
5754
|
}
|
|
5309
5755
|
message.costExponent = reader.uint32();
|
|
5310
5756
|
continue;
|
|
5311
5757
|
}
|
|
5312
|
-
if ((tag & 7)
|
|
5758
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5313
5759
|
break;
|
|
5314
5760
|
}
|
|
5315
5761
|
reader.skipType(tag & 7);
|
|
@@ -5327,11 +5773,21 @@ var ProcessVoteOptions = {
|
|
|
5327
5773
|
},
|
|
5328
5774
|
toJSON(message) {
|
|
5329
5775
|
const obj = {};
|
|
5330
|
-
message.maxCount !==
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
message.
|
|
5334
|
-
|
|
5776
|
+
if (message.maxCount !== 0) {
|
|
5777
|
+
obj.maxCount = Math.round(message.maxCount);
|
|
5778
|
+
}
|
|
5779
|
+
if (message.maxValue !== 0) {
|
|
5780
|
+
obj.maxValue = Math.round(message.maxValue);
|
|
5781
|
+
}
|
|
5782
|
+
if (message.maxVoteOverwrites !== 0) {
|
|
5783
|
+
obj.maxVoteOverwrites = Math.round(message.maxVoteOverwrites);
|
|
5784
|
+
}
|
|
5785
|
+
if (message.maxTotalCost !== 0) {
|
|
5786
|
+
obj.maxTotalCost = Math.round(message.maxTotalCost);
|
|
5787
|
+
}
|
|
5788
|
+
if (message.costExponent !== 0) {
|
|
5789
|
+
obj.costExponent = Math.round(message.costExponent);
|
|
5790
|
+
}
|
|
5335
5791
|
return obj;
|
|
5336
5792
|
},
|
|
5337
5793
|
create(base) {
|
|
@@ -5365,13 +5821,13 @@ var OracleList = {
|
|
|
5365
5821
|
const tag = reader.uint32();
|
|
5366
5822
|
switch (tag >>> 3) {
|
|
5367
5823
|
case 1:
|
|
5368
|
-
if (tag
|
|
5824
|
+
if (tag !== 10) {
|
|
5369
5825
|
break;
|
|
5370
5826
|
}
|
|
5371
5827
|
message.oracles.push(reader.bytes());
|
|
5372
5828
|
continue;
|
|
5373
5829
|
}
|
|
5374
|
-
if ((tag & 7)
|
|
5830
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5375
5831
|
break;
|
|
5376
5832
|
}
|
|
5377
5833
|
reader.skipType(tag & 7);
|
|
@@ -5383,10 +5839,8 @@ var OracleList = {
|
|
|
5383
5839
|
},
|
|
5384
5840
|
toJSON(message) {
|
|
5385
5841
|
const obj = {};
|
|
5386
|
-
if (message.oracles) {
|
|
5387
|
-
obj.oracles = message.oracles.map((e) => base64FromBytes(e
|
|
5388
|
-
} else {
|
|
5389
|
-
obj.oracles = [];
|
|
5842
|
+
if (message.oracles?.length) {
|
|
5843
|
+
obj.oracles = message.oracles.map((e) => base64FromBytes(e));
|
|
5390
5844
|
}
|
|
5391
5845
|
return obj;
|
|
5392
5846
|
},
|
|
@@ -5417,13 +5871,13 @@ var ValidatorList = {
|
|
|
5417
5871
|
const tag = reader.uint32();
|
|
5418
5872
|
switch (tag >>> 3) {
|
|
5419
5873
|
case 1:
|
|
5420
|
-
if (tag
|
|
5874
|
+
if (tag !== 10) {
|
|
5421
5875
|
break;
|
|
5422
5876
|
}
|
|
5423
5877
|
message.validators.push(Validator.decode(reader, reader.uint32()));
|
|
5424
5878
|
continue;
|
|
5425
5879
|
}
|
|
5426
|
-
if ((tag & 7)
|
|
5880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5427
5881
|
break;
|
|
5428
5882
|
}
|
|
5429
5883
|
reader.skipType(tag & 7);
|
|
@@ -5437,10 +5891,8 @@ var ValidatorList = {
|
|
|
5437
5891
|
},
|
|
5438
5892
|
toJSON(message) {
|
|
5439
5893
|
const obj = {};
|
|
5440
|
-
if (message.validators) {
|
|
5441
|
-
obj.validators = message.validators.map((e) =>
|
|
5442
|
-
} else {
|
|
5443
|
-
obj.validators = [];
|
|
5894
|
+
if (message.validators?.length) {
|
|
5895
|
+
obj.validators = message.validators.map((e) => Validator.toJSON(e));
|
|
5444
5896
|
}
|
|
5445
5897
|
return obj;
|
|
5446
5898
|
},
|
|
@@ -5454,7 +5906,7 @@ var ValidatorList = {
|
|
|
5454
5906
|
}
|
|
5455
5907
|
};
|
|
5456
5908
|
function createBaseValidator() {
|
|
5457
|
-
return { address: new Uint8Array(), pubKey: new Uint8Array(), power: 0, name: "", keyIndex: 0 };
|
|
5909
|
+
return { address: new Uint8Array(0), pubKey: new Uint8Array(0), power: 0, name: "", keyIndex: 0 };
|
|
5458
5910
|
}
|
|
5459
5911
|
var Validator = {
|
|
5460
5912
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -5483,37 +5935,37 @@ var Validator = {
|
|
|
5483
5935
|
const tag = reader.uint32();
|
|
5484
5936
|
switch (tag >>> 3) {
|
|
5485
5937
|
case 1:
|
|
5486
|
-
if (tag
|
|
5938
|
+
if (tag !== 10) {
|
|
5487
5939
|
break;
|
|
5488
5940
|
}
|
|
5489
5941
|
message.address = reader.bytes();
|
|
5490
5942
|
continue;
|
|
5491
5943
|
case 2:
|
|
5492
|
-
if (tag
|
|
5944
|
+
if (tag !== 18) {
|
|
5493
5945
|
break;
|
|
5494
5946
|
}
|
|
5495
5947
|
message.pubKey = reader.bytes();
|
|
5496
5948
|
continue;
|
|
5497
5949
|
case 3:
|
|
5498
|
-
if (tag
|
|
5950
|
+
if (tag !== 24) {
|
|
5499
5951
|
break;
|
|
5500
5952
|
}
|
|
5501
5953
|
message.power = longToNumber(reader.uint64());
|
|
5502
5954
|
continue;
|
|
5503
5955
|
case 4:
|
|
5504
|
-
if (tag
|
|
5956
|
+
if (tag !== 34) {
|
|
5505
5957
|
break;
|
|
5506
5958
|
}
|
|
5507
5959
|
message.name = reader.string();
|
|
5508
5960
|
continue;
|
|
5509
5961
|
case 5:
|
|
5510
|
-
if (tag
|
|
5962
|
+
if (tag !== 40) {
|
|
5511
5963
|
break;
|
|
5512
5964
|
}
|
|
5513
5965
|
message.keyIndex = reader.uint32();
|
|
5514
5966
|
continue;
|
|
5515
5967
|
}
|
|
5516
|
-
if ((tag & 7)
|
|
5968
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5517
5969
|
break;
|
|
5518
5970
|
}
|
|
5519
5971
|
reader.skipType(tag & 7);
|
|
@@ -5522,8 +5974,8 @@ var Validator = {
|
|
|
5522
5974
|
},
|
|
5523
5975
|
fromJSON(object) {
|
|
5524
5976
|
return {
|
|
5525
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
|
|
5526
|
-
pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(),
|
|
5977
|
+
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
5978
|
+
pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(0),
|
|
5527
5979
|
power: isSet(object.power) ? Number(object.power) : 0,
|
|
5528
5980
|
name: isSet(object.name) ? String(object.name) : "",
|
|
5529
5981
|
keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : 0
|
|
@@ -5531,11 +5983,21 @@ var Validator = {
|
|
|
5531
5983
|
},
|
|
5532
5984
|
toJSON(message) {
|
|
5533
5985
|
const obj = {};
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
message.
|
|
5538
|
-
|
|
5986
|
+
if (message.address.length !== 0) {
|
|
5987
|
+
obj.address = base64FromBytes(message.address);
|
|
5988
|
+
}
|
|
5989
|
+
if (message.pubKey.length !== 0) {
|
|
5990
|
+
obj.pubKey = base64FromBytes(message.pubKey);
|
|
5991
|
+
}
|
|
5992
|
+
if (message.power !== 0) {
|
|
5993
|
+
obj.power = Math.round(message.power);
|
|
5994
|
+
}
|
|
5995
|
+
if (message.name !== "") {
|
|
5996
|
+
obj.name = message.name;
|
|
5997
|
+
}
|
|
5998
|
+
if (message.keyIndex !== 0) {
|
|
5999
|
+
obj.keyIndex = Math.round(message.keyIndex);
|
|
6000
|
+
}
|
|
5539
6001
|
return obj;
|
|
5540
6002
|
},
|
|
5541
6003
|
create(base) {
|
|
@@ -5543,8 +6005,8 @@ var Validator = {
|
|
|
5543
6005
|
},
|
|
5544
6006
|
fromPartial(object) {
|
|
5545
6007
|
const message = createBaseValidator();
|
|
5546
|
-
message.address = object.address ?? new Uint8Array();
|
|
5547
|
-
message.pubKey = object.pubKey ?? new Uint8Array();
|
|
6008
|
+
message.address = object.address ?? new Uint8Array(0);
|
|
6009
|
+
message.pubKey = object.pubKey ?? new Uint8Array(0);
|
|
5548
6010
|
message.power = object.power ?? 0;
|
|
5549
6011
|
message.name = object.name ?? "";
|
|
5550
6012
|
message.keyIndex = object.keyIndex ?? 0;
|
|
@@ -5556,16 +6018,16 @@ function createBaseTendermintHeader() {
|
|
|
5556
6018
|
chainId: "",
|
|
5557
6019
|
height: 0,
|
|
5558
6020
|
timestamp: 0,
|
|
5559
|
-
blockID: new Uint8Array(),
|
|
5560
|
-
lastCommitHash: new Uint8Array(),
|
|
5561
|
-
dataHash: new Uint8Array(),
|
|
5562
|
-
validatorsHash: new Uint8Array(),
|
|
5563
|
-
nextValidatorsHash: new Uint8Array(),
|
|
5564
|
-
consensusHash: new Uint8Array(),
|
|
5565
|
-
appHash: new Uint8Array(),
|
|
5566
|
-
lastResultsHash: new Uint8Array(),
|
|
5567
|
-
evidenceHash: new Uint8Array(),
|
|
5568
|
-
proposerAddress: new Uint8Array()
|
|
6021
|
+
blockID: new Uint8Array(0),
|
|
6022
|
+
lastCommitHash: new Uint8Array(0),
|
|
6023
|
+
dataHash: new Uint8Array(0),
|
|
6024
|
+
validatorsHash: new Uint8Array(0),
|
|
6025
|
+
nextValidatorsHash: new Uint8Array(0),
|
|
6026
|
+
consensusHash: new Uint8Array(0),
|
|
6027
|
+
appHash: new Uint8Array(0),
|
|
6028
|
+
lastResultsHash: new Uint8Array(0),
|
|
6029
|
+
evidenceHash: new Uint8Array(0),
|
|
6030
|
+
proposerAddress: new Uint8Array(0)
|
|
5569
6031
|
};
|
|
5570
6032
|
}
|
|
5571
6033
|
var TendermintHeader = {
|
|
@@ -5619,85 +6081,85 @@ var TendermintHeader = {
|
|
|
5619
6081
|
const tag = reader.uint32();
|
|
5620
6082
|
switch (tag >>> 3) {
|
|
5621
6083
|
case 2:
|
|
5622
|
-
if (tag
|
|
6084
|
+
if (tag !== 18) {
|
|
5623
6085
|
break;
|
|
5624
6086
|
}
|
|
5625
6087
|
message.chainId = reader.string();
|
|
5626
6088
|
continue;
|
|
5627
6089
|
case 3:
|
|
5628
|
-
if (tag
|
|
6090
|
+
if (tag !== 24) {
|
|
5629
6091
|
break;
|
|
5630
6092
|
}
|
|
5631
6093
|
message.height = longToNumber(reader.int64());
|
|
5632
6094
|
continue;
|
|
5633
6095
|
case 4:
|
|
5634
|
-
if (tag
|
|
6096
|
+
if (tag !== 32) {
|
|
5635
6097
|
break;
|
|
5636
6098
|
}
|
|
5637
6099
|
message.timestamp = longToNumber(reader.int64());
|
|
5638
6100
|
continue;
|
|
5639
6101
|
case 5:
|
|
5640
|
-
if (tag
|
|
6102
|
+
if (tag !== 42) {
|
|
5641
6103
|
break;
|
|
5642
6104
|
}
|
|
5643
6105
|
message.blockID = reader.bytes();
|
|
5644
6106
|
continue;
|
|
5645
6107
|
case 6:
|
|
5646
|
-
if (tag
|
|
6108
|
+
if (tag !== 50) {
|
|
5647
6109
|
break;
|
|
5648
6110
|
}
|
|
5649
6111
|
message.lastCommitHash = reader.bytes();
|
|
5650
6112
|
continue;
|
|
5651
6113
|
case 7:
|
|
5652
|
-
if (tag
|
|
6114
|
+
if (tag !== 58) {
|
|
5653
6115
|
break;
|
|
5654
6116
|
}
|
|
5655
6117
|
message.dataHash = reader.bytes();
|
|
5656
6118
|
continue;
|
|
5657
6119
|
case 8:
|
|
5658
|
-
if (tag
|
|
6120
|
+
if (tag !== 66) {
|
|
5659
6121
|
break;
|
|
5660
6122
|
}
|
|
5661
6123
|
message.validatorsHash = reader.bytes();
|
|
5662
6124
|
continue;
|
|
5663
6125
|
case 9:
|
|
5664
|
-
if (tag
|
|
6126
|
+
if (tag !== 74) {
|
|
5665
6127
|
break;
|
|
5666
6128
|
}
|
|
5667
6129
|
message.nextValidatorsHash = reader.bytes();
|
|
5668
6130
|
continue;
|
|
5669
6131
|
case 10:
|
|
5670
|
-
if (tag
|
|
6132
|
+
if (tag !== 82) {
|
|
5671
6133
|
break;
|
|
5672
6134
|
}
|
|
5673
6135
|
message.consensusHash = reader.bytes();
|
|
5674
6136
|
continue;
|
|
5675
6137
|
case 11:
|
|
5676
|
-
if (tag
|
|
6138
|
+
if (tag !== 90) {
|
|
5677
6139
|
break;
|
|
5678
6140
|
}
|
|
5679
6141
|
message.appHash = reader.bytes();
|
|
5680
6142
|
continue;
|
|
5681
6143
|
case 12:
|
|
5682
|
-
if (tag
|
|
6144
|
+
if (tag !== 98) {
|
|
5683
6145
|
break;
|
|
5684
6146
|
}
|
|
5685
6147
|
message.lastResultsHash = reader.bytes();
|
|
5686
6148
|
continue;
|
|
5687
6149
|
case 13:
|
|
5688
|
-
if (tag
|
|
6150
|
+
if (tag !== 106) {
|
|
5689
6151
|
break;
|
|
5690
6152
|
}
|
|
5691
6153
|
message.evidenceHash = reader.bytes();
|
|
5692
6154
|
continue;
|
|
5693
6155
|
case 14:
|
|
5694
|
-
if (tag
|
|
6156
|
+
if (tag !== 114) {
|
|
5695
6157
|
break;
|
|
5696
6158
|
}
|
|
5697
6159
|
message.proposerAddress = reader.bytes();
|
|
5698
6160
|
continue;
|
|
5699
6161
|
}
|
|
5700
|
-
if ((tag & 7)
|
|
6162
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5701
6163
|
break;
|
|
5702
6164
|
}
|
|
5703
6165
|
reader.skipType(tag & 7);
|
|
@@ -5709,47 +6171,59 @@ var TendermintHeader = {
|
|
|
5709
6171
|
chainId: isSet(object.chainId) ? String(object.chainId) : "",
|
|
5710
6172
|
height: isSet(object.height) ? Number(object.height) : 0,
|
|
5711
6173
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
5712
|
-
blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(),
|
|
5713
|
-
lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(),
|
|
5714
|
-
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(),
|
|
5715
|
-
validatorsHash: isSet(object.validatorsHash) ? bytesFromBase64(object.validatorsHash) : new Uint8Array(),
|
|
5716
|
-
nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array(),
|
|
5717
|
-
consensusHash: isSet(object.consensusHash) ? bytesFromBase64(object.consensusHash) : new Uint8Array(),
|
|
5718
|
-
appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(),
|
|
5719
|
-
lastResultsHash: isSet(object.lastResultsHash) ? bytesFromBase64(object.lastResultsHash) : new Uint8Array(),
|
|
5720
|
-
evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array(),
|
|
5721
|
-
proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array()
|
|
6174
|
+
blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(0),
|
|
6175
|
+
lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(0),
|
|
6176
|
+
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
|
|
6177
|
+
validatorsHash: isSet(object.validatorsHash) ? bytesFromBase64(object.validatorsHash) : new Uint8Array(0),
|
|
6178
|
+
nextValidatorsHash: isSet(object.nextValidatorsHash) ? bytesFromBase64(object.nextValidatorsHash) : new Uint8Array(0),
|
|
6179
|
+
consensusHash: isSet(object.consensusHash) ? bytesFromBase64(object.consensusHash) : new Uint8Array(0),
|
|
6180
|
+
appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(0),
|
|
6181
|
+
lastResultsHash: isSet(object.lastResultsHash) ? bytesFromBase64(object.lastResultsHash) : new Uint8Array(0),
|
|
6182
|
+
evidenceHash: isSet(object.evidenceHash) ? bytesFromBase64(object.evidenceHash) : new Uint8Array(0),
|
|
6183
|
+
proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array(0)
|
|
5722
6184
|
};
|
|
5723
6185
|
},
|
|
5724
6186
|
toJSON(message) {
|
|
5725
6187
|
const obj = {};
|
|
5726
|
-
message.chainId !==
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
)
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
message.
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
message.
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
message.
|
|
5751
|
-
|
|
5752
|
-
|
|
6188
|
+
if (message.chainId !== "") {
|
|
6189
|
+
obj.chainId = message.chainId;
|
|
6190
|
+
}
|
|
6191
|
+
if (message.height !== 0) {
|
|
6192
|
+
obj.height = Math.round(message.height);
|
|
6193
|
+
}
|
|
6194
|
+
if (message.timestamp !== 0) {
|
|
6195
|
+
obj.timestamp = Math.round(message.timestamp);
|
|
6196
|
+
}
|
|
6197
|
+
if (message.blockID.length !== 0) {
|
|
6198
|
+
obj.blockID = base64FromBytes(message.blockID);
|
|
6199
|
+
}
|
|
6200
|
+
if (message.lastCommitHash.length !== 0) {
|
|
6201
|
+
obj.lastCommitHash = base64FromBytes(message.lastCommitHash);
|
|
6202
|
+
}
|
|
6203
|
+
if (message.dataHash.length !== 0) {
|
|
6204
|
+
obj.dataHash = base64FromBytes(message.dataHash);
|
|
6205
|
+
}
|
|
6206
|
+
if (message.validatorsHash.length !== 0) {
|
|
6207
|
+
obj.validatorsHash = base64FromBytes(message.validatorsHash);
|
|
6208
|
+
}
|
|
6209
|
+
if (message.nextValidatorsHash.length !== 0) {
|
|
6210
|
+
obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash);
|
|
6211
|
+
}
|
|
6212
|
+
if (message.consensusHash.length !== 0) {
|
|
6213
|
+
obj.consensusHash = base64FromBytes(message.consensusHash);
|
|
6214
|
+
}
|
|
6215
|
+
if (message.appHash.length !== 0) {
|
|
6216
|
+
obj.appHash = base64FromBytes(message.appHash);
|
|
6217
|
+
}
|
|
6218
|
+
if (message.lastResultsHash.length !== 0) {
|
|
6219
|
+
obj.lastResultsHash = base64FromBytes(message.lastResultsHash);
|
|
6220
|
+
}
|
|
6221
|
+
if (message.evidenceHash.length !== 0) {
|
|
6222
|
+
obj.evidenceHash = base64FromBytes(message.evidenceHash);
|
|
6223
|
+
}
|
|
6224
|
+
if (message.proposerAddress.length !== 0) {
|
|
6225
|
+
obj.proposerAddress = base64FromBytes(message.proposerAddress);
|
|
6226
|
+
}
|
|
5753
6227
|
return obj;
|
|
5754
6228
|
},
|
|
5755
6229
|
create(base) {
|
|
@@ -5760,39 +6234,27 @@ var TendermintHeader = {
|
|
|
5760
6234
|
message.chainId = object.chainId ?? "";
|
|
5761
6235
|
message.height = object.height ?? 0;
|
|
5762
6236
|
message.timestamp = object.timestamp ?? 0;
|
|
5763
|
-
message.blockID = object.blockID ?? new Uint8Array();
|
|
5764
|
-
message.lastCommitHash = object.lastCommitHash ?? new Uint8Array();
|
|
5765
|
-
message.dataHash = object.dataHash ?? new Uint8Array();
|
|
5766
|
-
message.validatorsHash = object.validatorsHash ?? new Uint8Array();
|
|
5767
|
-
message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array();
|
|
5768
|
-
message.consensusHash = object.consensusHash ?? new Uint8Array();
|
|
5769
|
-
message.appHash = object.appHash ?? new Uint8Array();
|
|
5770
|
-
message.lastResultsHash = object.lastResultsHash ?? new Uint8Array();
|
|
5771
|
-
message.evidenceHash = object.evidenceHash ?? new Uint8Array();
|
|
5772
|
-
message.proposerAddress = object.proposerAddress ?? new Uint8Array();
|
|
6237
|
+
message.blockID = object.blockID ?? new Uint8Array(0);
|
|
6238
|
+
message.lastCommitHash = object.lastCommitHash ?? new Uint8Array(0);
|
|
6239
|
+
message.dataHash = object.dataHash ?? new Uint8Array(0);
|
|
6240
|
+
message.validatorsHash = object.validatorsHash ?? new Uint8Array(0);
|
|
6241
|
+
message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array(0);
|
|
6242
|
+
message.consensusHash = object.consensusHash ?? new Uint8Array(0);
|
|
6243
|
+
message.appHash = object.appHash ?? new Uint8Array(0);
|
|
6244
|
+
message.lastResultsHash = object.lastResultsHash ?? new Uint8Array(0);
|
|
6245
|
+
message.evidenceHash = object.evidenceHash ?? new Uint8Array(0);
|
|
6246
|
+
message.proposerAddress = object.proposerAddress ?? new Uint8Array(0);
|
|
5773
6247
|
return message;
|
|
5774
6248
|
}
|
|
5775
6249
|
};
|
|
5776
6250
|
function createBaseProcessResult() {
|
|
5777
|
-
return { votes: []
|
|
6251
|
+
return { votes: [] };
|
|
5778
6252
|
}
|
|
5779
6253
|
var ProcessResult = {
|
|
5780
6254
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
5781
6255
|
for (const v of message.votes) {
|
|
5782
6256
|
QuestionResult.encode(v, writer.uint32(10).fork()).ldelim();
|
|
5783
6257
|
}
|
|
5784
|
-
if (message.processId !== void 0) {
|
|
5785
|
-
writer.uint32(18).bytes(message.processId);
|
|
5786
|
-
}
|
|
5787
|
-
if (message.entityId !== void 0) {
|
|
5788
|
-
writer.uint32(26).bytes(message.entityId);
|
|
5789
|
-
}
|
|
5790
|
-
if (message.oracleAddress !== void 0) {
|
|
5791
|
-
writer.uint32(34).bytes(message.oracleAddress);
|
|
5792
|
-
}
|
|
5793
|
-
if (message.signature !== void 0) {
|
|
5794
|
-
writer.uint32(42).bytes(message.signature);
|
|
5795
|
-
}
|
|
5796
6258
|
return writer;
|
|
5797
6259
|
},
|
|
5798
6260
|
decode(input, length) {
|
|
@@ -5803,37 +6265,13 @@ var ProcessResult = {
|
|
|
5803
6265
|
const tag = reader.uint32();
|
|
5804
6266
|
switch (tag >>> 3) {
|
|
5805
6267
|
case 1:
|
|
5806
|
-
if (tag
|
|
6268
|
+
if (tag !== 10) {
|
|
5807
6269
|
break;
|
|
5808
6270
|
}
|
|
5809
6271
|
message.votes.push(QuestionResult.decode(reader, reader.uint32()));
|
|
5810
6272
|
continue;
|
|
5811
|
-
case 2:
|
|
5812
|
-
if (tag != 18) {
|
|
5813
|
-
break;
|
|
5814
|
-
}
|
|
5815
|
-
message.processId = reader.bytes();
|
|
5816
|
-
continue;
|
|
5817
|
-
case 3:
|
|
5818
|
-
if (tag != 26) {
|
|
5819
|
-
break;
|
|
5820
|
-
}
|
|
5821
|
-
message.entityId = reader.bytes();
|
|
5822
|
-
continue;
|
|
5823
|
-
case 4:
|
|
5824
|
-
if (tag != 34) {
|
|
5825
|
-
break;
|
|
5826
|
-
}
|
|
5827
|
-
message.oracleAddress = reader.bytes();
|
|
5828
|
-
continue;
|
|
5829
|
-
case 5:
|
|
5830
|
-
if (tag != 42) {
|
|
5831
|
-
break;
|
|
5832
|
-
}
|
|
5833
|
-
message.signature = reader.bytes();
|
|
5834
|
-
continue;
|
|
5835
6273
|
}
|
|
5836
|
-
if ((tag & 7)
|
|
6274
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5837
6275
|
break;
|
|
5838
6276
|
}
|
|
5839
6277
|
reader.skipType(tag & 7);
|
|
@@ -5841,25 +6279,13 @@ var ProcessResult = {
|
|
|
5841
6279
|
return message;
|
|
5842
6280
|
},
|
|
5843
6281
|
fromJSON(object) {
|
|
5844
|
-
return {
|
|
5845
|
-
votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [],
|
|
5846
|
-
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : void 0,
|
|
5847
|
-
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : void 0,
|
|
5848
|
-
oracleAddress: isSet(object.oracleAddress) ? bytesFromBase64(object.oracleAddress) : void 0,
|
|
5849
|
-
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : void 0
|
|
5850
|
-
};
|
|
6282
|
+
return { votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [] };
|
|
5851
6283
|
},
|
|
5852
6284
|
toJSON(message) {
|
|
5853
6285
|
const obj = {};
|
|
5854
|
-
if (message.votes) {
|
|
5855
|
-
obj.votes = message.votes.map((e) =>
|
|
5856
|
-
}
|
|
5857
|
-
obj.votes = [];
|
|
5858
|
-
}
|
|
5859
|
-
message.processId !== void 0 && (obj.processId = message.processId !== void 0 ? base64FromBytes(message.processId) : void 0);
|
|
5860
|
-
message.entityId !== void 0 && (obj.entityId = message.entityId !== void 0 ? base64FromBytes(message.entityId) : void 0);
|
|
5861
|
-
message.oracleAddress !== void 0 && (obj.oracleAddress = message.oracleAddress !== void 0 ? base64FromBytes(message.oracleAddress) : void 0);
|
|
5862
|
-
message.signature !== void 0 && (obj.signature = message.signature !== void 0 ? base64FromBytes(message.signature) : void 0);
|
|
6286
|
+
if (message.votes?.length) {
|
|
6287
|
+
obj.votes = message.votes.map((e) => QuestionResult.toJSON(e));
|
|
6288
|
+
}
|
|
5863
6289
|
return obj;
|
|
5864
6290
|
},
|
|
5865
6291
|
create(base) {
|
|
@@ -5868,10 +6294,6 @@ var ProcessResult = {
|
|
|
5868
6294
|
fromPartial(object) {
|
|
5869
6295
|
const message = createBaseProcessResult();
|
|
5870
6296
|
message.votes = object.votes?.map((e) => QuestionResult.fromPartial(e)) || [];
|
|
5871
|
-
message.processId = object.processId ?? void 0;
|
|
5872
|
-
message.entityId = object.entityId ?? void 0;
|
|
5873
|
-
message.oracleAddress = object.oracleAddress ?? void 0;
|
|
5874
|
-
message.signature = object.signature ?? void 0;
|
|
5875
6297
|
return message;
|
|
5876
6298
|
}
|
|
5877
6299
|
};
|
|
@@ -5893,13 +6315,13 @@ var QuestionResult = {
|
|
|
5893
6315
|
const tag = reader.uint32();
|
|
5894
6316
|
switch (tag >>> 3) {
|
|
5895
6317
|
case 1:
|
|
5896
|
-
if (tag
|
|
6318
|
+
if (tag !== 10) {
|
|
5897
6319
|
break;
|
|
5898
6320
|
}
|
|
5899
6321
|
message.question.push(reader.bytes());
|
|
5900
6322
|
continue;
|
|
5901
6323
|
}
|
|
5902
|
-
if ((tag & 7)
|
|
6324
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5903
6325
|
break;
|
|
5904
6326
|
}
|
|
5905
6327
|
reader.skipType(tag & 7);
|
|
@@ -5911,10 +6333,8 @@ var QuestionResult = {
|
|
|
5911
6333
|
},
|
|
5912
6334
|
toJSON(message) {
|
|
5913
6335
|
const obj = {};
|
|
5914
|
-
if (message.question) {
|
|
5915
|
-
obj.question = message.question.map((e) => base64FromBytes(e
|
|
5916
|
-
} else {
|
|
5917
|
-
obj.question = [];
|
|
6336
|
+
if (message.question?.length) {
|
|
6337
|
+
obj.question = message.question.map((e) => base64FromBytes(e));
|
|
5918
6338
|
}
|
|
5919
6339
|
return obj;
|
|
5920
6340
|
},
|
|
@@ -5945,13 +6365,13 @@ var ProcessEndingList = {
|
|
|
5945
6365
|
const tag = reader.uint32();
|
|
5946
6366
|
switch (tag >>> 3) {
|
|
5947
6367
|
case 1:
|
|
5948
|
-
if (tag
|
|
6368
|
+
if (tag !== 10) {
|
|
5949
6369
|
break;
|
|
5950
6370
|
}
|
|
5951
6371
|
message.processList.push(reader.bytes());
|
|
5952
6372
|
continue;
|
|
5953
6373
|
}
|
|
5954
|
-
if ((tag & 7)
|
|
6374
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5955
6375
|
break;
|
|
5956
6376
|
}
|
|
5957
6377
|
reader.skipType(tag & 7);
|
|
@@ -5965,10 +6385,8 @@ var ProcessEndingList = {
|
|
|
5965
6385
|
},
|
|
5966
6386
|
toJSON(message) {
|
|
5967
6387
|
const obj = {};
|
|
5968
|
-
if (message.processList) {
|
|
5969
|
-
obj.processList = message.processList.map((e) => base64FromBytes(e
|
|
5970
|
-
} else {
|
|
5971
|
-
obj.processList = [];
|
|
6388
|
+
if (message.processList?.length) {
|
|
6389
|
+
obj.processList = message.processList.map((e) => base64FromBytes(e));
|
|
5972
6390
|
}
|
|
5973
6391
|
return obj;
|
|
5974
6392
|
},
|
|
@@ -5999,13 +6417,13 @@ var StoredKeys = {
|
|
|
5999
6417
|
const tag = reader.uint32();
|
|
6000
6418
|
switch (tag >>> 3) {
|
|
6001
6419
|
case 1:
|
|
6002
|
-
if (tag
|
|
6420
|
+
if (tag !== 10) {
|
|
6003
6421
|
break;
|
|
6004
6422
|
}
|
|
6005
6423
|
message.pids.push(reader.bytes());
|
|
6006
6424
|
continue;
|
|
6007
6425
|
}
|
|
6008
|
-
if ((tag & 7)
|
|
6426
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6009
6427
|
break;
|
|
6010
6428
|
}
|
|
6011
6429
|
reader.skipType(tag & 7);
|
|
@@ -6017,10 +6435,8 @@ var StoredKeys = {
|
|
|
6017
6435
|
},
|
|
6018
6436
|
toJSON(message) {
|
|
6019
6437
|
const obj = {};
|
|
6020
|
-
if (message.pids) {
|
|
6021
|
-
obj.pids = message.pids.map((e) => base64FromBytes(e
|
|
6022
|
-
} else {
|
|
6023
|
-
obj.pids = [];
|
|
6438
|
+
if (message.pids?.length) {
|
|
6439
|
+
obj.pids = message.pids.map((e) => base64FromBytes(e));
|
|
6024
6440
|
}
|
|
6025
6441
|
return obj;
|
|
6026
6442
|
},
|
|
@@ -6118,12 +6534,14 @@ export {
|
|
|
6118
6534
|
ProofZkSNARK,
|
|
6119
6535
|
QuestionResult,
|
|
6120
6536
|
RegisterKeyTx,
|
|
6537
|
+
RegisterSIKTx,
|
|
6121
6538
|
SendTokensTx,
|
|
6122
6539
|
SetAccountTx,
|
|
6123
6540
|
SetKeykeeperTx,
|
|
6124
6541
|
SetProcessTx,
|
|
6125
6542
|
SetTransactionCostsTx,
|
|
6126
6543
|
SignedTx,
|
|
6544
|
+
SikTx,
|
|
6127
6545
|
SourceNetworkId,
|
|
6128
6546
|
StoredKeys,
|
|
6129
6547
|
TendermintHeader,
|