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