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