@vocdoni/proto 1.15.3 → 1.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/client-store/index.js +51 -71
- package/build/js/client-store/index.mjs +51 -71
- package/build/js/{index-fe26a63a.d.ts → index-cbd70a7b.d.ts} +722 -1788
- package/build/js/index.d.ts +1 -1
- package/build/js/index.js +459 -590
- package/build/js/index.mjs +459 -590
- package/build/js/metadata/index.js +133 -80
- package/build/js/metadata/index.mjs +133 -80
- package/build/js/vochain/index.d.ts +1 -1
- package/build/js/vochain/index.js +287 -447
- package/build/js/vochain/index.mjs +287 -443
- package/package.json +5 -3
|
@@ -1195,7 +1195,11 @@ var require_reader = __commonJS({
|
|
|
1195
1195
|
this.pos += length;
|
|
1196
1196
|
if (Array.isArray(this.buf))
|
|
1197
1197
|
return this.buf.slice(start, end);
|
|
1198
|
-
|
|
1198
|
+
if (start === end) {
|
|
1199
|
+
var nativeBuffer = util.Buffer;
|
|
1200
|
+
return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
|
|
1201
|
+
}
|
|
1202
|
+
return this._slice.call(this.buf, start, end);
|
|
1199
1203
|
};
|
|
1200
1204
|
Reader.prototype.string = function read_string() {
|
|
1201
1205
|
var bytes = this.bytes();
|
|
@@ -1431,9 +1435,7 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
|
|
|
1431
1435
|
TxType2[TxType2["VOTE"] = 11] = "VOTE";
|
|
1432
1436
|
TxType2[TxType2["SET_PROCESS_RESULTS"] = 12] = "SET_PROCESS_RESULTS";
|
|
1433
1437
|
TxType2[TxType2["REGISTER_VOTER_KEY"] = 13] = "REGISTER_VOTER_KEY";
|
|
1434
|
-
TxType2[TxType2["MINT_TOKENS"] = 14] = "MINT_TOKENS";
|
|
1435
1438
|
TxType2[TxType2["SEND_TOKENS"] = 15] = "SEND_TOKENS";
|
|
1436
|
-
TxType2[TxType2["SET_TRANSACTION_COSTS"] = 16] = "SET_TRANSACTION_COSTS";
|
|
1437
1439
|
TxType2[TxType2["SET_ACCOUNT_INFO_URI"] = 17] = "SET_ACCOUNT_INFO_URI";
|
|
1438
1440
|
TxType2[TxType2["ADD_DELEGATE_FOR_ACCOUNT"] = 18] = "ADD_DELEGATE_FOR_ACCOUNT";
|
|
1439
1441
|
TxType2[TxType2["DEL_DELEGATE_FOR_ACCOUNT"] = 19] = "DEL_DELEGATE_FOR_ACCOUNT";
|
|
@@ -1444,6 +1446,8 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
|
|
|
1444
1446
|
TxType2[TxType2["SET_ACCOUNT_SIK"] = 24] = "SET_ACCOUNT_SIK";
|
|
1445
1447
|
TxType2[TxType2["DEL_ACCOUNT_SIK"] = 25] = "DEL_ACCOUNT_SIK";
|
|
1446
1448
|
TxType2[TxType2["REGISTER_SIK"] = 26] = "REGISTER_SIK";
|
|
1449
|
+
TxType2[TxType2["SET_ACCOUNT_VALIDATOR"] = 27] = "SET_ACCOUNT_VALIDATOR";
|
|
1450
|
+
TxType2[TxType2["SET_PROCESS_DURATION"] = 28] = "SET_PROCESS_DURATION";
|
|
1447
1451
|
TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1448
1452
|
return TxType2;
|
|
1449
1453
|
})(TxType || {});
|
|
@@ -1491,15 +1495,9 @@ function txTypeFromJSON(object) {
|
|
|
1491
1495
|
case 13:
|
|
1492
1496
|
case "REGISTER_VOTER_KEY":
|
|
1493
1497
|
return 13 /* REGISTER_VOTER_KEY */;
|
|
1494
|
-
case 14:
|
|
1495
|
-
case "MINT_TOKENS":
|
|
1496
|
-
return 14 /* MINT_TOKENS */;
|
|
1497
1498
|
case 15:
|
|
1498
1499
|
case "SEND_TOKENS":
|
|
1499
1500
|
return 15 /* SEND_TOKENS */;
|
|
1500
|
-
case 16:
|
|
1501
|
-
case "SET_TRANSACTION_COSTS":
|
|
1502
|
-
return 16 /* SET_TRANSACTION_COSTS */;
|
|
1503
1501
|
case 17:
|
|
1504
1502
|
case "SET_ACCOUNT_INFO_URI":
|
|
1505
1503
|
return 17 /* SET_ACCOUNT_INFO_URI */;
|
|
@@ -1530,6 +1528,12 @@ function txTypeFromJSON(object) {
|
|
|
1530
1528
|
case 26:
|
|
1531
1529
|
case "REGISTER_SIK":
|
|
1532
1530
|
return 26 /* REGISTER_SIK */;
|
|
1531
|
+
case 27:
|
|
1532
|
+
case "SET_ACCOUNT_VALIDATOR":
|
|
1533
|
+
return 27 /* SET_ACCOUNT_VALIDATOR */;
|
|
1534
|
+
case 28:
|
|
1535
|
+
case "SET_PROCESS_DURATION":
|
|
1536
|
+
return 28 /* SET_PROCESS_DURATION */;
|
|
1533
1537
|
case -1:
|
|
1534
1538
|
case "UNRECOGNIZED":
|
|
1535
1539
|
default:
|
|
@@ -1566,12 +1570,8 @@ function txTypeToJSON(object) {
|
|
|
1566
1570
|
return "SET_PROCESS_RESULTS";
|
|
1567
1571
|
case 13 /* REGISTER_VOTER_KEY */:
|
|
1568
1572
|
return "REGISTER_VOTER_KEY";
|
|
1569
|
-
case 14 /* MINT_TOKENS */:
|
|
1570
|
-
return "MINT_TOKENS";
|
|
1571
1573
|
case 15 /* SEND_TOKENS */:
|
|
1572
1574
|
return "SEND_TOKENS";
|
|
1573
|
-
case 16 /* SET_TRANSACTION_COSTS */:
|
|
1574
|
-
return "SET_TRANSACTION_COSTS";
|
|
1575
1575
|
case 17 /* SET_ACCOUNT_INFO_URI */:
|
|
1576
1576
|
return "SET_ACCOUNT_INFO_URI";
|
|
1577
1577
|
case 18 /* ADD_DELEGATE_FOR_ACCOUNT */:
|
|
@@ -1592,6 +1592,10 @@ function txTypeToJSON(object) {
|
|
|
1592
1592
|
return "DEL_ACCOUNT_SIK";
|
|
1593
1593
|
case 26 /* REGISTER_SIK */:
|
|
1594
1594
|
return "REGISTER_SIK";
|
|
1595
|
+
case 27 /* SET_ACCOUNT_VALIDATOR */:
|
|
1596
|
+
return "SET_ACCOUNT_VALIDATOR";
|
|
1597
|
+
case 28 /* SET_PROCESS_DURATION */:
|
|
1598
|
+
return "SET_PROCESS_DURATION";
|
|
1595
1599
|
case -1 /* UNRECOGNIZED */:
|
|
1596
1600
|
default:
|
|
1597
1601
|
return "UNRECOGNIZED";
|
|
@@ -1841,8 +1845,6 @@ var Census_Type = /* @__PURE__ */ ((Census_Type2) => {
|
|
|
1841
1845
|
Census_Type2[Census_Type2["ETHEREUMSTORAGE"] = 3] = "ETHEREUMSTORAGE";
|
|
1842
1846
|
Census_Type2[Census_Type2["ETHEREUMACCOUNT"] = 4] = "ETHEREUMACCOUNT";
|
|
1843
1847
|
Census_Type2[Census_Type2["CA"] = 5] = "CA";
|
|
1844
|
-
Census_Type2[Census_Type2["GRAVITON"] = 1001] = "GRAVITON";
|
|
1845
|
-
Census_Type2[Census_Type2["IDEN3"] = 1002] = "IDEN3";
|
|
1846
1848
|
Census_Type2[Census_Type2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1847
1849
|
return Census_Type2;
|
|
1848
1850
|
})(Census_Type || {});
|
|
@@ -1866,12 +1868,6 @@ function census_TypeFromJSON(object) {
|
|
|
1866
1868
|
case 5:
|
|
1867
1869
|
case "CA":
|
|
1868
1870
|
return 5 /* CA */;
|
|
1869
|
-
case 1001:
|
|
1870
|
-
case "GRAVITON":
|
|
1871
|
-
return 1001 /* GRAVITON */;
|
|
1872
|
-
case 1002:
|
|
1873
|
-
case "IDEN3":
|
|
1874
|
-
return 1002 /* IDEN3 */;
|
|
1875
1871
|
case -1:
|
|
1876
1872
|
case "UNRECOGNIZED":
|
|
1877
1873
|
default:
|
|
@@ -1892,10 +1888,6 @@ function census_TypeToJSON(object) {
|
|
|
1892
1888
|
return "ETHEREUMACCOUNT";
|
|
1893
1889
|
case 5 /* CA */:
|
|
1894
1890
|
return "CA";
|
|
1895
|
-
case 1001 /* GRAVITON */:
|
|
1896
|
-
return "GRAVITON";
|
|
1897
|
-
case 1002 /* IDEN3 */:
|
|
1898
|
-
return "IDEN3";
|
|
1899
1891
|
case -1 /* UNRECOGNIZED */:
|
|
1900
1892
|
default:
|
|
1901
1893
|
return "UNRECOGNIZED";
|
|
@@ -2111,7 +2103,7 @@ var VoteEnvelope = {
|
|
|
2111
2103
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
2112
2104
|
votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(0),
|
|
2113
2105
|
nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(0),
|
|
2114
|
-
encryptionKeyIndexes: Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => Number(e)) : []
|
|
2106
|
+
encryptionKeyIndexes: globalThis.Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => globalThis.Number(e)) : []
|
|
2115
2107
|
};
|
|
2116
2108
|
},
|
|
2117
2109
|
toJSON(message) {
|
|
@@ -2193,12 +2185,6 @@ function createBaseProof() {
|
|
|
2193
2185
|
var Proof = {
|
|
2194
2186
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
2195
2187
|
switch (message.payload?.$case) {
|
|
2196
|
-
case "graviton":
|
|
2197
|
-
ProofGraviton.encode(message.payload.graviton, writer.uint32(10).fork()).ldelim();
|
|
2198
|
-
break;
|
|
2199
|
-
case "iden3":
|
|
2200
|
-
ProofIden3.encode(message.payload.iden3, writer.uint32(18).fork()).ldelim();
|
|
2201
|
-
break;
|
|
2202
2188
|
case "ethereumStorage":
|
|
2203
2189
|
ProofEthereumStorage.encode(message.payload.ethereumStorage, writer.uint32(26).fork()).ldelim();
|
|
2204
2190
|
break;
|
|
@@ -2227,18 +2213,6 @@ var Proof = {
|
|
|
2227
2213
|
while (reader.pos < end) {
|
|
2228
2214
|
const tag = reader.uint32();
|
|
2229
2215
|
switch (tag >>> 3) {
|
|
2230
|
-
case 1:
|
|
2231
|
-
if (tag !== 10) {
|
|
2232
|
-
break;
|
|
2233
|
-
}
|
|
2234
|
-
message.payload = { $case: "graviton", graviton: ProofGraviton.decode(reader, reader.uint32()) };
|
|
2235
|
-
continue;
|
|
2236
|
-
case 2:
|
|
2237
|
-
if (tag !== 18) {
|
|
2238
|
-
break;
|
|
2239
|
-
}
|
|
2240
|
-
message.payload = { $case: "iden3", iden3: ProofIden3.decode(reader, reader.uint32()) };
|
|
2241
|
-
continue;
|
|
2242
2216
|
case 3:
|
|
2243
2217
|
if (tag !== 26) {
|
|
2244
2218
|
break;
|
|
@@ -2291,17 +2265,11 @@ var Proof = {
|
|
|
2291
2265
|
},
|
|
2292
2266
|
fromJSON(object) {
|
|
2293
2267
|
return {
|
|
2294
|
-
payload: isSet(object.
|
|
2268
|
+
payload: isSet(object.ethereumStorage) ? { $case: "ethereumStorage", ethereumStorage: ProofEthereumStorage.fromJSON(object.ethereumStorage) } : isSet(object.ethereumAccount) ? { $case: "ethereumAccount", ethereumAccount: ProofEthereumAccount.fromJSON(object.ethereumAccount) } : isSet(object.ca) ? { $case: "ca", ca: ProofCA.fromJSON(object.ca) } : isSet(object.arbo) ? { $case: "arbo", arbo: ProofArbo.fromJSON(object.arbo) } : isSet(object.zkSnark) ? { $case: "zkSnark", zkSnark: ProofZkSNARK.fromJSON(object.zkSnark) } : isSet(object.minimeStorage) ? { $case: "minimeStorage", minimeStorage: ProofMinime.fromJSON(object.minimeStorage) } : void 0
|
|
2295
2269
|
};
|
|
2296
2270
|
},
|
|
2297
2271
|
toJSON(message) {
|
|
2298
2272
|
const obj = {};
|
|
2299
|
-
if (message.payload?.$case === "graviton") {
|
|
2300
|
-
obj.graviton = ProofGraviton.toJSON(message.payload.graviton);
|
|
2301
|
-
}
|
|
2302
|
-
if (message.payload?.$case === "iden3") {
|
|
2303
|
-
obj.iden3 = ProofIden3.toJSON(message.payload.iden3);
|
|
2304
|
-
}
|
|
2305
2273
|
if (message.payload?.$case === "ethereumStorage") {
|
|
2306
2274
|
obj.ethereumStorage = ProofEthereumStorage.toJSON(message.payload.ethereumStorage);
|
|
2307
2275
|
}
|
|
@@ -2327,12 +2295,6 @@ var Proof = {
|
|
|
2327
2295
|
},
|
|
2328
2296
|
fromPartial(object) {
|
|
2329
2297
|
const message = createBaseProof();
|
|
2330
|
-
if (object.payload?.$case === "graviton" && object.payload?.graviton !== void 0 && object.payload?.graviton !== null) {
|
|
2331
|
-
message.payload = { $case: "graviton", graviton: ProofGraviton.fromPartial(object.payload.graviton) };
|
|
2332
|
-
}
|
|
2333
|
-
if (object.payload?.$case === "iden3" && object.payload?.iden3 !== void 0 && object.payload?.iden3 !== null) {
|
|
2334
|
-
message.payload = { $case: "iden3", iden3: ProofIden3.fromPartial(object.payload.iden3) };
|
|
2335
|
-
}
|
|
2336
2298
|
if (object.payload?.$case === "ethereumStorage" && object.payload?.ethereumStorage !== void 0 && object.payload?.ethereumStorage !== null) {
|
|
2337
2299
|
message.payload = {
|
|
2338
2300
|
$case: "ethereumStorage",
|
|
@@ -2363,106 +2325,6 @@ var Proof = {
|
|
|
2363
2325
|
return message;
|
|
2364
2326
|
}
|
|
2365
2327
|
};
|
|
2366
|
-
function createBaseProofGraviton() {
|
|
2367
|
-
return { siblings: new Uint8Array(0) };
|
|
2368
|
-
}
|
|
2369
|
-
var ProofGraviton = {
|
|
2370
|
-
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
2371
|
-
if (message.siblings.length !== 0) {
|
|
2372
|
-
writer.uint32(10).bytes(message.siblings);
|
|
2373
|
-
}
|
|
2374
|
-
return writer;
|
|
2375
|
-
},
|
|
2376
|
-
decode(input, length) {
|
|
2377
|
-
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
2378
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2379
|
-
const message = createBaseProofGraviton();
|
|
2380
|
-
while (reader.pos < end) {
|
|
2381
|
-
const tag = reader.uint32();
|
|
2382
|
-
switch (tag >>> 3) {
|
|
2383
|
-
case 1:
|
|
2384
|
-
if (tag !== 10) {
|
|
2385
|
-
break;
|
|
2386
|
-
}
|
|
2387
|
-
message.siblings = reader.bytes();
|
|
2388
|
-
continue;
|
|
2389
|
-
}
|
|
2390
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2391
|
-
break;
|
|
2392
|
-
}
|
|
2393
|
-
reader.skipType(tag & 7);
|
|
2394
|
-
}
|
|
2395
|
-
return message;
|
|
2396
|
-
},
|
|
2397
|
-
fromJSON(object) {
|
|
2398
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2399
|
-
},
|
|
2400
|
-
toJSON(message) {
|
|
2401
|
-
const obj = {};
|
|
2402
|
-
if (message.siblings.length !== 0) {
|
|
2403
|
-
obj.siblings = base64FromBytes(message.siblings);
|
|
2404
|
-
}
|
|
2405
|
-
return obj;
|
|
2406
|
-
},
|
|
2407
|
-
create(base) {
|
|
2408
|
-
return ProofGraviton.fromPartial(base ?? {});
|
|
2409
|
-
},
|
|
2410
|
-
fromPartial(object) {
|
|
2411
|
-
const message = createBaseProofGraviton();
|
|
2412
|
-
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2413
|
-
return message;
|
|
2414
|
-
}
|
|
2415
|
-
};
|
|
2416
|
-
function createBaseProofIden3() {
|
|
2417
|
-
return { siblings: new Uint8Array(0) };
|
|
2418
|
-
}
|
|
2419
|
-
var ProofIden3 = {
|
|
2420
|
-
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
2421
|
-
if (message.siblings.length !== 0) {
|
|
2422
|
-
writer.uint32(10).bytes(message.siblings);
|
|
2423
|
-
}
|
|
2424
|
-
return writer;
|
|
2425
|
-
},
|
|
2426
|
-
decode(input, length) {
|
|
2427
|
-
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
2428
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2429
|
-
const message = createBaseProofIden3();
|
|
2430
|
-
while (reader.pos < end) {
|
|
2431
|
-
const tag = reader.uint32();
|
|
2432
|
-
switch (tag >>> 3) {
|
|
2433
|
-
case 1:
|
|
2434
|
-
if (tag !== 10) {
|
|
2435
|
-
break;
|
|
2436
|
-
}
|
|
2437
|
-
message.siblings = reader.bytes();
|
|
2438
|
-
continue;
|
|
2439
|
-
}
|
|
2440
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2441
|
-
break;
|
|
2442
|
-
}
|
|
2443
|
-
reader.skipType(tag & 7);
|
|
2444
|
-
}
|
|
2445
|
-
return message;
|
|
2446
|
-
},
|
|
2447
|
-
fromJSON(object) {
|
|
2448
|
-
return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
|
|
2449
|
-
},
|
|
2450
|
-
toJSON(message) {
|
|
2451
|
-
const obj = {};
|
|
2452
|
-
if (message.siblings.length !== 0) {
|
|
2453
|
-
obj.siblings = base64FromBytes(message.siblings);
|
|
2454
|
-
}
|
|
2455
|
-
return obj;
|
|
2456
|
-
},
|
|
2457
|
-
create(base) {
|
|
2458
|
-
return ProofIden3.fromPartial(base ?? {});
|
|
2459
|
-
},
|
|
2460
|
-
fromPartial(object) {
|
|
2461
|
-
const message = createBaseProofIden3();
|
|
2462
|
-
message.siblings = object.siblings ?? new Uint8Array(0);
|
|
2463
|
-
return message;
|
|
2464
|
-
}
|
|
2465
|
-
};
|
|
2466
2328
|
function createBaseProofEthereumStorage() {
|
|
2467
2329
|
return { key: new Uint8Array(0), value: new Uint8Array(0), siblings: [] };
|
|
2468
2330
|
}
|
|
@@ -2516,7 +2378,7 @@ var ProofEthereumStorage = {
|
|
|
2516
2378
|
return {
|
|
2517
2379
|
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
2518
2380
|
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
2519
|
-
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2381
|
+
siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2520
2382
|
};
|
|
2521
2383
|
},
|
|
2522
2384
|
toJSON(message) {
|
|
@@ -2622,7 +2484,7 @@ var ProofEthereumAccount = {
|
|
|
2622
2484
|
balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(0),
|
|
2623
2485
|
storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(0),
|
|
2624
2486
|
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
|
|
2625
|
-
siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2487
|
+
siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
|
|
2626
2488
|
};
|
|
2627
2489
|
},
|
|
2628
2490
|
toJSON(message) {
|
|
@@ -3052,11 +2914,11 @@ var ProofZkSNARK = {
|
|
|
3052
2914
|
},
|
|
3053
2915
|
fromJSON(object) {
|
|
3054
2916
|
return {
|
|
3055
|
-
circuitParametersIndex: isSet(object.circuitParametersIndex) ? Number(object.circuitParametersIndex) : 0,
|
|
3056
|
-
a: Array.isArray(object?.a) ? object.a.map((e) => String(e)) : [],
|
|
3057
|
-
b: Array.isArray(object?.b) ? object.b.map((e) => String(e)) : [],
|
|
3058
|
-
c: Array.isArray(object?.c) ? object.c.map((e) => String(e)) : [],
|
|
3059
|
-
publicInputs: Array.isArray(object?.publicInputs) ? object.publicInputs.map((e) => String(e)) : []
|
|
2917
|
+
circuitParametersIndex: isSet(object.circuitParametersIndex) ? globalThis.Number(object.circuitParametersIndex) : 0,
|
|
2918
|
+
a: globalThis.Array.isArray(object?.a) ? object.a.map((e) => globalThis.String(e)) : [],
|
|
2919
|
+
b: globalThis.Array.isArray(object?.b) ? object.b.map((e) => globalThis.String(e)) : [],
|
|
2920
|
+
c: globalThis.Array.isArray(object?.c) ? object.c.map((e) => globalThis.String(e)) : [],
|
|
2921
|
+
publicInputs: globalThis.Array.isArray(object?.publicInputs) ? object.publicInputs.map((e) => globalThis.String(e)) : []
|
|
3060
2922
|
};
|
|
3061
2923
|
},
|
|
3062
2924
|
toJSON(message) {
|
|
@@ -3160,11 +3022,11 @@ var Account = {
|
|
|
3160
3022
|
},
|
|
3161
3023
|
fromJSON(object) {
|
|
3162
3024
|
return {
|
|
3163
|
-
balance: isSet(object.balance) ? Number(object.balance) : 0,
|
|
3164
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3165
|
-
infoURI: isSet(object.infoURI) ? String(object.infoURI) : "",
|
|
3166
|
-
delegateAddrs: Array.isArray(object?.delegateAddrs) ? object.delegateAddrs.map((e) => bytesFromBase64(e)) : [],
|
|
3167
|
-
processIndex: isSet(object.processIndex) ? Number(object.processIndex) : 0
|
|
3025
|
+
balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
|
|
3026
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
3027
|
+
infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : "",
|
|
3028
|
+
delegateAddrs: globalThis.Array.isArray(object?.delegateAddrs) ? object.delegateAddrs.map((e) => bytesFromBase64(e)) : [],
|
|
3029
|
+
processIndex: isSet(object.processIndex) ? globalThis.Number(object.processIndex) : 0
|
|
3168
3030
|
};
|
|
3169
3031
|
},
|
|
3170
3032
|
toJSON(message) {
|
|
@@ -3199,72 +3061,6 @@ var Account = {
|
|
|
3199
3061
|
return message;
|
|
3200
3062
|
}
|
|
3201
3063
|
};
|
|
3202
|
-
function createBaseTreasurer() {
|
|
3203
|
-
return { address: new Uint8Array(0), nonce: 0 };
|
|
3204
|
-
}
|
|
3205
|
-
var Treasurer = {
|
|
3206
|
-
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
3207
|
-
if (message.address.length !== 0) {
|
|
3208
|
-
writer.uint32(10).bytes(message.address);
|
|
3209
|
-
}
|
|
3210
|
-
if (message.nonce !== 0) {
|
|
3211
|
-
writer.uint32(16).uint32(message.nonce);
|
|
3212
|
-
}
|
|
3213
|
-
return writer;
|
|
3214
|
-
},
|
|
3215
|
-
decode(input, length) {
|
|
3216
|
-
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
3217
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3218
|
-
const message = createBaseTreasurer();
|
|
3219
|
-
while (reader.pos < end) {
|
|
3220
|
-
const tag = reader.uint32();
|
|
3221
|
-
switch (tag >>> 3) {
|
|
3222
|
-
case 1:
|
|
3223
|
-
if (tag !== 10) {
|
|
3224
|
-
break;
|
|
3225
|
-
}
|
|
3226
|
-
message.address = reader.bytes();
|
|
3227
|
-
continue;
|
|
3228
|
-
case 2:
|
|
3229
|
-
if (tag !== 16) {
|
|
3230
|
-
break;
|
|
3231
|
-
}
|
|
3232
|
-
message.nonce = reader.uint32();
|
|
3233
|
-
continue;
|
|
3234
|
-
}
|
|
3235
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3236
|
-
break;
|
|
3237
|
-
}
|
|
3238
|
-
reader.skipType(tag & 7);
|
|
3239
|
-
}
|
|
3240
|
-
return message;
|
|
3241
|
-
},
|
|
3242
|
-
fromJSON(object) {
|
|
3243
|
-
return {
|
|
3244
|
-
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
3245
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0
|
|
3246
|
-
};
|
|
3247
|
-
},
|
|
3248
|
-
toJSON(message) {
|
|
3249
|
-
const obj = {};
|
|
3250
|
-
if (message.address.length !== 0) {
|
|
3251
|
-
obj.address = base64FromBytes(message.address);
|
|
3252
|
-
}
|
|
3253
|
-
if (message.nonce !== 0) {
|
|
3254
|
-
obj.nonce = Math.round(message.nonce);
|
|
3255
|
-
}
|
|
3256
|
-
return obj;
|
|
3257
|
-
},
|
|
3258
|
-
create(base) {
|
|
3259
|
-
return Treasurer.fromPartial(base ?? {});
|
|
3260
|
-
},
|
|
3261
|
-
fromPartial(object) {
|
|
3262
|
-
const message = createBaseTreasurer();
|
|
3263
|
-
message.address = object.address ?? new Uint8Array(0);
|
|
3264
|
-
message.nonce = object.nonce ?? 0;
|
|
3265
|
-
return message;
|
|
3266
|
-
}
|
|
3267
|
-
};
|
|
3268
3064
|
function createBaseTx() {
|
|
3269
3065
|
return { payload: void 0 };
|
|
3270
3066
|
}
|
|
@@ -3286,9 +3082,6 @@ var Tx = {
|
|
|
3286
3082
|
case "registerKey":
|
|
3287
3083
|
RegisterKeyTx.encode(message.payload.registerKey, writer.uint32(42).fork()).ldelim();
|
|
3288
3084
|
break;
|
|
3289
|
-
case "mintTokens":
|
|
3290
|
-
MintTokensTx.encode(message.payload.mintTokens, writer.uint32(50).fork()).ldelim();
|
|
3291
|
-
break;
|
|
3292
3085
|
case "sendTokens":
|
|
3293
3086
|
SendTokensTx.encode(message.payload.sendTokens, writer.uint32(58).fork()).ldelim();
|
|
3294
3087
|
break;
|
|
@@ -3353,12 +3146,6 @@ var Tx = {
|
|
|
3353
3146
|
}
|
|
3354
3147
|
message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.decode(reader, reader.uint32()) };
|
|
3355
3148
|
continue;
|
|
3356
|
-
case 6:
|
|
3357
|
-
if (tag !== 50) {
|
|
3358
|
-
break;
|
|
3359
|
-
}
|
|
3360
|
-
message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.decode(reader, reader.uint32()) };
|
|
3361
|
-
continue;
|
|
3362
3149
|
case 7:
|
|
3363
3150
|
if (tag !== 58) {
|
|
3364
3151
|
break;
|
|
@@ -3420,7 +3207,7 @@ var Tx = {
|
|
|
3420
3207
|
},
|
|
3421
3208
|
fromJSON(object) {
|
|
3422
3209
|
return {
|
|
3423
|
-
payload: isSet(object.vote) ? { $case: "vote", vote: VoteEnvelope.fromJSON(object.vote) } : isSet(object.newProcess) ? { $case: "newProcess", newProcess: NewProcessTx.fromJSON(object.newProcess) } : isSet(object.admin) ? { $case: "admin", admin: AdminTx.fromJSON(object.admin) } : isSet(object.setProcess) ? { $case: "setProcess", setProcess: SetProcessTx.fromJSON(object.setProcess) } : isSet(object.registerKey) ? { $case: "registerKey", registerKey: RegisterKeyTx.fromJSON(object.registerKey) } : isSet(object.
|
|
3210
|
+
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.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet(object.setTransactionCosts) ? {
|
|
3424
3211
|
$case: "setTransactionCosts",
|
|
3425
3212
|
setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
|
|
3426
3213
|
} : 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
|
|
@@ -3443,9 +3230,6 @@ var Tx = {
|
|
|
3443
3230
|
if (message.payload?.$case === "registerKey") {
|
|
3444
3231
|
obj.registerKey = RegisterKeyTx.toJSON(message.payload.registerKey);
|
|
3445
3232
|
}
|
|
3446
|
-
if (message.payload?.$case === "mintTokens") {
|
|
3447
|
-
obj.mintTokens = MintTokensTx.toJSON(message.payload.mintTokens);
|
|
3448
|
-
}
|
|
3449
3233
|
if (message.payload?.$case === "sendTokens") {
|
|
3450
3234
|
obj.sendTokens = SendTokensTx.toJSON(message.payload.sendTokens);
|
|
3451
3235
|
}
|
|
@@ -3492,9 +3276,6 @@ var Tx = {
|
|
|
3492
3276
|
if (object.payload?.$case === "registerKey" && object.payload?.registerKey !== void 0 && object.payload?.registerKey !== null) {
|
|
3493
3277
|
message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.fromPartial(object.payload.registerKey) };
|
|
3494
3278
|
}
|
|
3495
|
-
if (object.payload?.$case === "mintTokens" && object.payload?.mintTokens !== void 0 && object.payload?.mintTokens !== null) {
|
|
3496
|
-
message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.fromPartial(object.payload.mintTokens) };
|
|
3497
|
-
}
|
|
3498
3279
|
if (object.payload?.$case === "sendTokens" && object.payload?.sendTokens !== void 0 && object.payload?.sendTokens !== null) {
|
|
3499
3280
|
message.payload = { $case: "sendTokens", sendTokens: SendTokensTx.fromPartial(object.payload.sendTokens) };
|
|
3500
3281
|
}
|
|
@@ -3649,7 +3430,7 @@ var NewProcessTx = {
|
|
|
3649
3430
|
fromJSON(object) {
|
|
3650
3431
|
return {
|
|
3651
3432
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3652
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3433
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
3653
3434
|
process: isSet(object.process) ? Process.fromJSON(object.process) : void 0
|
|
3654
3435
|
};
|
|
3655
3436
|
},
|
|
@@ -3688,7 +3469,8 @@ function createBaseSetProcessTx() {
|
|
|
3688
3469
|
censusURI: void 0,
|
|
3689
3470
|
proof: void 0,
|
|
3690
3471
|
results: void 0,
|
|
3691
|
-
tempSIKs: void 0
|
|
3472
|
+
tempSIKs: void 0,
|
|
3473
|
+
duration: void 0
|
|
3692
3474
|
};
|
|
3693
3475
|
}
|
|
3694
3476
|
var SetProcessTx = {
|
|
@@ -3723,6 +3505,9 @@ var SetProcessTx = {
|
|
|
3723
3505
|
if (message.tempSIKs !== void 0) {
|
|
3724
3506
|
writer.uint32(80).bool(message.tempSIKs);
|
|
3725
3507
|
}
|
|
3508
|
+
if (message.duration !== void 0) {
|
|
3509
|
+
writer.uint32(88).uint32(message.duration);
|
|
3510
|
+
}
|
|
3726
3511
|
return writer;
|
|
3727
3512
|
},
|
|
3728
3513
|
decode(input, length) {
|
|
@@ -3792,6 +3577,12 @@ var SetProcessTx = {
|
|
|
3792
3577
|
}
|
|
3793
3578
|
message.tempSIKs = reader.bool();
|
|
3794
3579
|
continue;
|
|
3580
|
+
case 11:
|
|
3581
|
+
if (tag !== 88) {
|
|
3582
|
+
break;
|
|
3583
|
+
}
|
|
3584
|
+
message.duration = reader.uint32();
|
|
3585
|
+
continue;
|
|
3795
3586
|
}
|
|
3796
3587
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3797
3588
|
break;
|
|
@@ -3803,15 +3594,16 @@ var SetProcessTx = {
|
|
|
3803
3594
|
fromJSON(object) {
|
|
3804
3595
|
return {
|
|
3805
3596
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
3806
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3597
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
3807
3598
|
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
3808
3599
|
status: isSet(object.status) ? processStatusFromJSON(object.status) : void 0,
|
|
3809
|
-
questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
|
|
3600
|
+
questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
|
|
3810
3601
|
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : void 0,
|
|
3811
|
-
censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
|
|
3602
|
+
censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
|
|
3812
3603
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
3813
3604
|
results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
|
|
3814
|
-
tempSIKs: isSet(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
|
|
3605
|
+
tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0,
|
|
3606
|
+
duration: isSet(object.duration) ? globalThis.Number(object.duration) : void 0
|
|
3815
3607
|
};
|
|
3816
3608
|
},
|
|
3817
3609
|
toJSON(message) {
|
|
@@ -3846,6 +3638,9 @@ var SetProcessTx = {
|
|
|
3846
3638
|
if (message.tempSIKs !== void 0) {
|
|
3847
3639
|
obj.tempSIKs = message.tempSIKs;
|
|
3848
3640
|
}
|
|
3641
|
+
if (message.duration !== void 0) {
|
|
3642
|
+
obj.duration = Math.round(message.duration);
|
|
3643
|
+
}
|
|
3849
3644
|
return obj;
|
|
3850
3645
|
},
|
|
3851
3646
|
create(base) {
|
|
@@ -3863,6 +3658,7 @@ var SetProcessTx = {
|
|
|
3863
3658
|
message.proof = object.proof !== void 0 && object.proof !== null ? Proof.fromPartial(object.proof) : void 0;
|
|
3864
3659
|
message.results = object.results !== void 0 && object.results !== null ? ProcessResult.fromPartial(object.results) : void 0;
|
|
3865
3660
|
message.tempSIKs = object.tempSIKs ?? void 0;
|
|
3661
|
+
message.duration = object.duration ?? void 0;
|
|
3866
3662
|
return message;
|
|
3867
3663
|
}
|
|
3868
3664
|
};
|
|
@@ -3986,10 +3782,10 @@ var AdminTx = {
|
|
|
3986
3782
|
address: isSet(object.address) ? bytesFromBase64(object.address) : void 0,
|
|
3987
3783
|
encryptionPrivateKey: isSet(object.encryptionPrivateKey) ? bytesFromBase64(object.encryptionPrivateKey) : void 0,
|
|
3988
3784
|
encryptionPublicKey: isSet(object.encryptionPublicKey) ? bytesFromBase64(object.encryptionPublicKey) : void 0,
|
|
3989
|
-
keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : void 0,
|
|
3990
|
-
power: isSet(object.power) ? Number(object.power) : void 0,
|
|
3785
|
+
keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
|
|
3786
|
+
power: isSet(object.power) ? globalThis.Number(object.power) : void 0,
|
|
3991
3787
|
publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
|
|
3992
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0
|
|
3788
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
|
|
3993
3789
|
};
|
|
3994
3790
|
},
|
|
3995
3791
|
toJSON(message) {
|
|
@@ -4109,11 +3905,11 @@ var RegisterKeyTx = {
|
|
|
4109
3905
|
},
|
|
4110
3906
|
fromJSON(object) {
|
|
4111
3907
|
return {
|
|
4112
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
3908
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
4113
3909
|
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
4114
3910
|
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
|
|
4115
3911
|
newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(0),
|
|
4116
|
-
weight: isSet(object.weight) ? String(object.weight) : ""
|
|
3912
|
+
weight: isSet(object.weight) ? globalThis.String(object.weight) : ""
|
|
4117
3913
|
};
|
|
4118
3914
|
},
|
|
4119
3915
|
toJSON(message) {
|
|
@@ -4148,100 +3944,6 @@ var RegisterKeyTx = {
|
|
|
4148
3944
|
return message;
|
|
4149
3945
|
}
|
|
4150
3946
|
};
|
|
4151
|
-
function createBaseMintTokensTx() {
|
|
4152
|
-
return { txtype: 0, nonce: 0, to: new Uint8Array(0), value: 0 };
|
|
4153
|
-
}
|
|
4154
|
-
var MintTokensTx = {
|
|
4155
|
-
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4156
|
-
if (message.txtype !== 0) {
|
|
4157
|
-
writer.uint32(8).int32(message.txtype);
|
|
4158
|
-
}
|
|
4159
|
-
if (message.nonce !== 0) {
|
|
4160
|
-
writer.uint32(16).uint32(message.nonce);
|
|
4161
|
-
}
|
|
4162
|
-
if (message.to.length !== 0) {
|
|
4163
|
-
writer.uint32(26).bytes(message.to);
|
|
4164
|
-
}
|
|
4165
|
-
if (message.value !== 0) {
|
|
4166
|
-
writer.uint32(32).uint64(message.value);
|
|
4167
|
-
}
|
|
4168
|
-
return writer;
|
|
4169
|
-
},
|
|
4170
|
-
decode(input, length) {
|
|
4171
|
-
const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
|
|
4172
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4173
|
-
const message = createBaseMintTokensTx();
|
|
4174
|
-
while (reader.pos < end) {
|
|
4175
|
-
const tag = reader.uint32();
|
|
4176
|
-
switch (tag >>> 3) {
|
|
4177
|
-
case 1:
|
|
4178
|
-
if (tag !== 8) {
|
|
4179
|
-
break;
|
|
4180
|
-
}
|
|
4181
|
-
message.txtype = reader.int32();
|
|
4182
|
-
continue;
|
|
4183
|
-
case 2:
|
|
4184
|
-
if (tag !== 16) {
|
|
4185
|
-
break;
|
|
4186
|
-
}
|
|
4187
|
-
message.nonce = reader.uint32();
|
|
4188
|
-
continue;
|
|
4189
|
-
case 3:
|
|
4190
|
-
if (tag !== 26) {
|
|
4191
|
-
break;
|
|
4192
|
-
}
|
|
4193
|
-
message.to = reader.bytes();
|
|
4194
|
-
continue;
|
|
4195
|
-
case 4:
|
|
4196
|
-
if (tag !== 32) {
|
|
4197
|
-
break;
|
|
4198
|
-
}
|
|
4199
|
-
message.value = longToNumber(reader.uint64());
|
|
4200
|
-
continue;
|
|
4201
|
-
}
|
|
4202
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
4203
|
-
break;
|
|
4204
|
-
}
|
|
4205
|
-
reader.skipType(tag & 7);
|
|
4206
|
-
}
|
|
4207
|
-
return message;
|
|
4208
|
-
},
|
|
4209
|
-
fromJSON(object) {
|
|
4210
|
-
return {
|
|
4211
|
-
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4212
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4213
|
-
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4214
|
-
value: isSet(object.value) ? Number(object.value) : 0
|
|
4215
|
-
};
|
|
4216
|
-
},
|
|
4217
|
-
toJSON(message) {
|
|
4218
|
-
const obj = {};
|
|
4219
|
-
if (message.txtype !== 0) {
|
|
4220
|
-
obj.txtype = txTypeToJSON(message.txtype);
|
|
4221
|
-
}
|
|
4222
|
-
if (message.nonce !== 0) {
|
|
4223
|
-
obj.nonce = Math.round(message.nonce);
|
|
4224
|
-
}
|
|
4225
|
-
if (message.to.length !== 0) {
|
|
4226
|
-
obj.to = base64FromBytes(message.to);
|
|
4227
|
-
}
|
|
4228
|
-
if (message.value !== 0) {
|
|
4229
|
-
obj.value = Math.round(message.value);
|
|
4230
|
-
}
|
|
4231
|
-
return obj;
|
|
4232
|
-
},
|
|
4233
|
-
create(base) {
|
|
4234
|
-
return MintTokensTx.fromPartial(base ?? {});
|
|
4235
|
-
},
|
|
4236
|
-
fromPartial(object) {
|
|
4237
|
-
const message = createBaseMintTokensTx();
|
|
4238
|
-
message.txtype = object.txtype ?? 0;
|
|
4239
|
-
message.nonce = object.nonce ?? 0;
|
|
4240
|
-
message.to = object.to ?? new Uint8Array(0);
|
|
4241
|
-
message.value = object.value ?? 0;
|
|
4242
|
-
return message;
|
|
4243
|
-
}
|
|
4244
|
-
};
|
|
4245
3947
|
function createBaseSendTokensTx() {
|
|
4246
3948
|
return { txtype: 0, nonce: 0, from: new Uint8Array(0), to: new Uint8Array(0), value: 0 };
|
|
4247
3949
|
}
|
|
@@ -4312,10 +4014,10 @@ var SendTokensTx = {
|
|
|
4312
4014
|
fromJSON(object) {
|
|
4313
4015
|
return {
|
|
4314
4016
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4315
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4017
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
4316
4018
|
from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(0),
|
|
4317
4019
|
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4318
|
-
value: isSet(object.value) ? Number(object.value) : 0
|
|
4020
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0
|
|
4319
4021
|
};
|
|
4320
4022
|
},
|
|
4321
4023
|
toJSON(message) {
|
|
@@ -4402,8 +4104,8 @@ var SetTransactionCostsTx = {
|
|
|
4402
4104
|
fromJSON(object) {
|
|
4403
4105
|
return {
|
|
4404
4106
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4405
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4406
|
-
value: isSet(object.value) ? Number(object.value) : 0
|
|
4107
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
4108
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0
|
|
4407
4109
|
};
|
|
4408
4110
|
},
|
|
4409
4111
|
toJSON(message) {
|
|
@@ -4438,7 +4140,9 @@ function createBaseSetAccountTx() {
|
|
|
4438
4140
|
account: void 0,
|
|
4439
4141
|
faucetPackage: void 0,
|
|
4440
4142
|
delegates: [],
|
|
4441
|
-
SIK: void 0
|
|
4143
|
+
SIK: void 0,
|
|
4144
|
+
publicKey: void 0,
|
|
4145
|
+
name: void 0
|
|
4442
4146
|
};
|
|
4443
4147
|
}
|
|
4444
4148
|
var SetAccountTx = {
|
|
@@ -4464,6 +4168,12 @@ var SetAccountTx = {
|
|
|
4464
4168
|
if (message.SIK !== void 0) {
|
|
4465
4169
|
writer.uint32(58).bytes(message.SIK);
|
|
4466
4170
|
}
|
|
4171
|
+
if (message.publicKey !== void 0) {
|
|
4172
|
+
writer.uint32(66).bytes(message.publicKey);
|
|
4173
|
+
}
|
|
4174
|
+
if (message.name !== void 0) {
|
|
4175
|
+
writer.uint32(74).string(message.name);
|
|
4176
|
+
}
|
|
4467
4177
|
return writer;
|
|
4468
4178
|
},
|
|
4469
4179
|
decode(input, length) {
|
|
@@ -4515,6 +4225,18 @@ var SetAccountTx = {
|
|
|
4515
4225
|
}
|
|
4516
4226
|
message.SIK = reader.bytes();
|
|
4517
4227
|
continue;
|
|
4228
|
+
case 8:
|
|
4229
|
+
if (tag !== 66) {
|
|
4230
|
+
break;
|
|
4231
|
+
}
|
|
4232
|
+
message.publicKey = reader.bytes();
|
|
4233
|
+
continue;
|
|
4234
|
+
case 9:
|
|
4235
|
+
if (tag !== 74) {
|
|
4236
|
+
break;
|
|
4237
|
+
}
|
|
4238
|
+
message.name = reader.string();
|
|
4239
|
+
continue;
|
|
4518
4240
|
}
|
|
4519
4241
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4520
4242
|
break;
|
|
@@ -4526,12 +4248,14 @@ var SetAccountTx = {
|
|
|
4526
4248
|
fromJSON(object) {
|
|
4527
4249
|
return {
|
|
4528
4250
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4529
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : void 0,
|
|
4530
|
-
infoURI: isSet(object.infoURI) ? String(object.infoURI) : void 0,
|
|
4251
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
|
|
4252
|
+
infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : void 0,
|
|
4531
4253
|
account: isSet(object.account) ? bytesFromBase64(object.account) : void 0,
|
|
4532
4254
|
faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
|
|
4533
|
-
delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
|
|
4534
|
-
SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0
|
|
4255
|
+
delegates: globalThis.Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
|
|
4256
|
+
SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0,
|
|
4257
|
+
publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
|
|
4258
|
+
name: isSet(object.name) ? globalThis.String(object.name) : void 0
|
|
4535
4259
|
};
|
|
4536
4260
|
},
|
|
4537
4261
|
toJSON(message) {
|
|
@@ -4557,6 +4281,12 @@ var SetAccountTx = {
|
|
|
4557
4281
|
if (message.SIK !== void 0) {
|
|
4558
4282
|
obj.SIK = base64FromBytes(message.SIK);
|
|
4559
4283
|
}
|
|
4284
|
+
if (message.publicKey !== void 0) {
|
|
4285
|
+
obj.publicKey = base64FromBytes(message.publicKey);
|
|
4286
|
+
}
|
|
4287
|
+
if (message.name !== void 0) {
|
|
4288
|
+
obj.name = message.name;
|
|
4289
|
+
}
|
|
4560
4290
|
return obj;
|
|
4561
4291
|
},
|
|
4562
4292
|
create(base) {
|
|
@@ -4571,17 +4301,22 @@ var SetAccountTx = {
|
|
|
4571
4301
|
message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
|
|
4572
4302
|
message.delegates = object.delegates?.map((e) => e) || [];
|
|
4573
4303
|
message.SIK = object.SIK ?? void 0;
|
|
4304
|
+
message.publicKey = object.publicKey ?? void 0;
|
|
4305
|
+
message.name = object.name ?? void 0;
|
|
4574
4306
|
return message;
|
|
4575
4307
|
}
|
|
4576
4308
|
};
|
|
4577
4309
|
function createBaseSIKTx() {
|
|
4578
|
-
return { txtype: 0, SIK: void 0 };
|
|
4310
|
+
return { txtype: 0, nonce: void 0, SIK: void 0 };
|
|
4579
4311
|
}
|
|
4580
4312
|
var SIKTx = {
|
|
4581
4313
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
4582
4314
|
if (message.txtype !== 0) {
|
|
4583
4315
|
writer.uint32(8).int32(message.txtype);
|
|
4584
4316
|
}
|
|
4317
|
+
if (message.nonce !== void 0) {
|
|
4318
|
+
writer.uint32(16).uint32(message.nonce);
|
|
4319
|
+
}
|
|
4585
4320
|
if (message.SIK !== void 0) {
|
|
4586
4321
|
writer.uint32(26).bytes(message.SIK);
|
|
4587
4322
|
}
|
|
@@ -4600,6 +4335,12 @@ var SIKTx = {
|
|
|
4600
4335
|
}
|
|
4601
4336
|
message.txtype = reader.int32();
|
|
4602
4337
|
continue;
|
|
4338
|
+
case 2:
|
|
4339
|
+
if (tag !== 16) {
|
|
4340
|
+
break;
|
|
4341
|
+
}
|
|
4342
|
+
message.nonce = reader.uint32();
|
|
4343
|
+
continue;
|
|
4603
4344
|
case 3:
|
|
4604
4345
|
if (tag !== 26) {
|
|
4605
4346
|
break;
|
|
@@ -4617,6 +4358,7 @@ var SIKTx = {
|
|
|
4617
4358
|
fromJSON(object) {
|
|
4618
4359
|
return {
|
|
4619
4360
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
4361
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
|
|
4620
4362
|
SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0
|
|
4621
4363
|
};
|
|
4622
4364
|
},
|
|
@@ -4625,6 +4367,9 @@ var SIKTx = {
|
|
|
4625
4367
|
if (message.txtype !== 0) {
|
|
4626
4368
|
obj.txtype = txTypeToJSON(message.txtype);
|
|
4627
4369
|
}
|
|
4370
|
+
if (message.nonce !== void 0) {
|
|
4371
|
+
obj.nonce = Math.round(message.nonce);
|
|
4372
|
+
}
|
|
4628
4373
|
if (message.SIK !== void 0) {
|
|
4629
4374
|
obj.SIK = base64FromBytes(message.SIK);
|
|
4630
4375
|
}
|
|
@@ -4636,6 +4381,7 @@ var SIKTx = {
|
|
|
4636
4381
|
fromPartial(object) {
|
|
4637
4382
|
const message = createBaseSIKTx();
|
|
4638
4383
|
message.txtype = object.txtype ?? 0;
|
|
4384
|
+
message.nonce = object.nonce ?? void 0;
|
|
4639
4385
|
message.SIK = object.SIK ?? void 0;
|
|
4640
4386
|
return message;
|
|
4641
4387
|
}
|
|
@@ -4773,7 +4519,7 @@ var CollectFaucetTx = {
|
|
|
4773
4519
|
return {
|
|
4774
4520
|
txType: isSet(object.txType) ? txTypeFromJSON(object.txType) : 0,
|
|
4775
4521
|
faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
|
|
4776
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0
|
|
4522
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
|
|
4777
4523
|
};
|
|
4778
4524
|
},
|
|
4779
4525
|
toJSON(message) {
|
|
@@ -4851,9 +4597,9 @@ var FaucetPayload = {
|
|
|
4851
4597
|
},
|
|
4852
4598
|
fromJSON(object) {
|
|
4853
4599
|
return {
|
|
4854
|
-
identifier: isSet(object.identifier) ? Number(object.identifier) : 0,
|
|
4600
|
+
identifier: isSet(object.identifier) ? globalThis.Number(object.identifier) : 0,
|
|
4855
4601
|
to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
|
|
4856
|
-
amount: isSet(object.amount) ? Number(object.amount) : 0
|
|
4602
|
+
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0
|
|
4857
4603
|
};
|
|
4858
4604
|
},
|
|
4859
4605
|
toJSON(message) {
|
|
@@ -4998,7 +4744,7 @@ var SetKeykeeperTx = {
|
|
|
4998
4744
|
fromJSON(object) {
|
|
4999
4745
|
return {
|
|
5000
4746
|
txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
|
|
5001
|
-
nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
|
|
4747
|
+
nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
|
|
5002
4748
|
keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array(0)
|
|
5003
4749
|
};
|
|
5004
4750
|
},
|
|
@@ -5058,7 +4804,9 @@ function createBaseProcess() {
|
|
|
5058
4804
|
nullifiersRoot: void 0,
|
|
5059
4805
|
sourceNetworkContractAddr: void 0,
|
|
5060
4806
|
tokenDecimals: void 0,
|
|
5061
|
-
tempSIKs: void 0
|
|
4807
|
+
tempSIKs: void 0,
|
|
4808
|
+
startTime: 0,
|
|
4809
|
+
duration: 0
|
|
5062
4810
|
};
|
|
5063
4811
|
}
|
|
5064
4812
|
var Process = {
|
|
@@ -5156,6 +4904,12 @@ var Process = {
|
|
|
5156
4904
|
if (message.tempSIKs !== void 0) {
|
|
5157
4905
|
writer.uint32(272).bool(message.tempSIKs);
|
|
5158
4906
|
}
|
|
4907
|
+
if (message.startTime !== 0) {
|
|
4908
|
+
writer.uint32(280).uint32(message.startTime);
|
|
4909
|
+
}
|
|
4910
|
+
if (message.duration !== 0) {
|
|
4911
|
+
writer.uint32(288).uint32(message.duration);
|
|
4912
|
+
}
|
|
5159
4913
|
return writer;
|
|
5160
4914
|
},
|
|
5161
4915
|
decode(input, length) {
|
|
@@ -5351,6 +5105,18 @@ var Process = {
|
|
|
5351
5105
|
}
|
|
5352
5106
|
message.tempSIKs = reader.bool();
|
|
5353
5107
|
continue;
|
|
5108
|
+
case 35:
|
|
5109
|
+
if (tag !== 280) {
|
|
5110
|
+
break;
|
|
5111
|
+
}
|
|
5112
|
+
message.startTime = reader.uint32();
|
|
5113
|
+
continue;
|
|
5114
|
+
case 36:
|
|
5115
|
+
if (tag !== 288) {
|
|
5116
|
+
break;
|
|
5117
|
+
}
|
|
5118
|
+
message.duration = reader.uint32();
|
|
5119
|
+
continue;
|
|
5354
5120
|
}
|
|
5355
5121
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5356
5122
|
break;
|
|
@@ -5363,35 +5129,37 @@ var Process = {
|
|
|
5363
5129
|
return {
|
|
5364
5130
|
processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
|
|
5365
5131
|
entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(0),
|
|
5366
|
-
startBlock: isSet(object.startBlock) ? Number(object.startBlock) : 0,
|
|
5367
|
-
blockCount: isSet(object.blockCount) ? Number(object.blockCount) : 0,
|
|
5132
|
+
startBlock: isSet(object.startBlock) ? globalThis.Number(object.startBlock) : 0,
|
|
5133
|
+
blockCount: isSet(object.blockCount) ? globalThis.Number(object.blockCount) : 0,
|
|
5368
5134
|
censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(0),
|
|
5369
|
-
censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
|
|
5370
|
-
encryptionPrivateKeys: Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => String(e)) : [],
|
|
5371
|
-
encryptionPublicKeys: Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => String(e)) : [],
|
|
5372
|
-
keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : void 0,
|
|
5135
|
+
censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
|
|
5136
|
+
encryptionPrivateKeys: globalThis.Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => globalThis.String(e)) : [],
|
|
5137
|
+
encryptionPublicKeys: globalThis.Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => globalThis.String(e)) : [],
|
|
5138
|
+
keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
|
|
5373
5139
|
status: isSet(object.status) ? processStatusFromJSON(object.status) : 0,
|
|
5374
5140
|
paramsSignature: isSet(object.paramsSignature) ? bytesFromBase64(object.paramsSignature) : void 0,
|
|
5375
|
-
namespace: isSet(object.namespace) ? Number(object.namespace) : 0,
|
|
5141
|
+
namespace: isSet(object.namespace) ? globalThis.Number(object.namespace) : 0,
|
|
5376
5142
|
envelopeType: isSet(object.envelopeType) ? EnvelopeType.fromJSON(object.envelopeType) : void 0,
|
|
5377
5143
|
mode: isSet(object.mode) ? ProcessMode.fromJSON(object.mode) : void 0,
|
|
5378
|
-
questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
|
|
5379
|
-
questionCount: isSet(object.questionCount) ? Number(object.questionCount) : void 0,
|
|
5144
|
+
questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
|
|
5145
|
+
questionCount: isSet(object.questionCount) ? globalThis.Number(object.questionCount) : void 0,
|
|
5380
5146
|
voteOptions: isSet(object.voteOptions) ? ProcessVoteOptions.fromJSON(object.voteOptions) : void 0,
|
|
5381
5147
|
censusOrigin: isSet(object.censusOrigin) ? censusOriginFromJSON(object.censusOrigin) : 0,
|
|
5382
5148
|
results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
|
|
5383
|
-
ethIndexSlot: isSet(object.ethIndexSlot) ? Number(object.ethIndexSlot) : void 0,
|
|
5384
|
-
sourceBlockHeight: isSet(object.sourceBlockHeight) ? Number(object.sourceBlockHeight) : void 0,
|
|
5149
|
+
ethIndexSlot: isSet(object.ethIndexSlot) ? globalThis.Number(object.ethIndexSlot) : void 0,
|
|
5150
|
+
sourceBlockHeight: isSet(object.sourceBlockHeight) ? globalThis.Number(object.sourceBlockHeight) : void 0,
|
|
5385
5151
|
owner: isSet(object.owner) ? bytesFromBase64(object.owner) : void 0,
|
|
5386
|
-
metadata: isSet(object.metadata) ? String(object.metadata) : void 0,
|
|
5152
|
+
metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : void 0,
|
|
5387
5153
|
sourceNetworkId: isSet(object.sourceNetworkId) ? sourceNetworkIdFromJSON(object.sourceNetworkId) : 0,
|
|
5388
|
-
maxCensusSize: isSet(object.maxCensusSize) ? Number(object.maxCensusSize) : 0,
|
|
5154
|
+
maxCensusSize: isSet(object.maxCensusSize) ? globalThis.Number(object.maxCensusSize) : 0,
|
|
5389
5155
|
rollingCensusRoot: isSet(object.rollingCensusRoot) ? bytesFromBase64(object.rollingCensusRoot) : void 0,
|
|
5390
|
-
rollingCensusSize: isSet(object.rollingCensusSize) ? Number(object.rollingCensusSize) : void 0,
|
|
5156
|
+
rollingCensusSize: isSet(object.rollingCensusSize) ? globalThis.Number(object.rollingCensusSize) : void 0,
|
|
5391
5157
|
nullifiersRoot: isSet(object.nullifiersRoot) ? bytesFromBase64(object.nullifiersRoot) : void 0,
|
|
5392
5158
|
sourceNetworkContractAddr: isSet(object.sourceNetworkContractAddr) ? bytesFromBase64(object.sourceNetworkContractAddr) : void 0,
|
|
5393
|
-
tokenDecimals: isSet(object.tokenDecimals) ? Number(object.tokenDecimals) : void 0,
|
|
5394
|
-
tempSIKs: isSet(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
|
|
5159
|
+
tokenDecimals: isSet(object.tokenDecimals) ? globalThis.Number(object.tokenDecimals) : void 0,
|
|
5160
|
+
tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0,
|
|
5161
|
+
startTime: isSet(object.startTime) ? globalThis.Number(object.startTime) : 0,
|
|
5162
|
+
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0
|
|
5395
5163
|
};
|
|
5396
5164
|
},
|
|
5397
5165
|
toJSON(message) {
|
|
@@ -5489,6 +5257,12 @@ var Process = {
|
|
|
5489
5257
|
if (message.tempSIKs !== void 0) {
|
|
5490
5258
|
obj.tempSIKs = message.tempSIKs;
|
|
5491
5259
|
}
|
|
5260
|
+
if (message.startTime !== 0) {
|
|
5261
|
+
obj.startTime = Math.round(message.startTime);
|
|
5262
|
+
}
|
|
5263
|
+
if (message.duration !== 0) {
|
|
5264
|
+
obj.duration = Math.round(message.duration);
|
|
5265
|
+
}
|
|
5492
5266
|
return obj;
|
|
5493
5267
|
},
|
|
5494
5268
|
create(base) {
|
|
@@ -5527,6 +5301,8 @@ var Process = {
|
|
|
5527
5301
|
message.sourceNetworkContractAddr = object.sourceNetworkContractAddr ?? void 0;
|
|
5528
5302
|
message.tokenDecimals = object.tokenDecimals ?? void 0;
|
|
5529
5303
|
message.tempSIKs = object.tempSIKs ?? void 0;
|
|
5304
|
+
message.startTime = object.startTime ?? 0;
|
|
5305
|
+
message.duration = object.duration ?? 0;
|
|
5530
5306
|
return message;
|
|
5531
5307
|
}
|
|
5532
5308
|
};
|
|
@@ -5599,11 +5375,11 @@ var EnvelopeType = {
|
|
|
5599
5375
|
},
|
|
5600
5376
|
fromJSON(object) {
|
|
5601
5377
|
return {
|
|
5602
|
-
serial: isSet(object.serial) ? Boolean(object.serial) : false,
|
|
5603
|
-
anonymous: isSet(object.anonymous) ? Boolean(object.anonymous) : false,
|
|
5604
|
-
encryptedVotes: isSet(object.encryptedVotes) ? Boolean(object.encryptedVotes) : false,
|
|
5605
|
-
uniqueValues: isSet(object.uniqueValues) ? Boolean(object.uniqueValues) : false,
|
|
5606
|
-
costFromWeight: isSet(object.costFromWeight) ? Boolean(object.costFromWeight) : false
|
|
5378
|
+
serial: isSet(object.serial) ? globalThis.Boolean(object.serial) : false,
|
|
5379
|
+
anonymous: isSet(object.anonymous) ? globalThis.Boolean(object.anonymous) : false,
|
|
5380
|
+
encryptedVotes: isSet(object.encryptedVotes) ? globalThis.Boolean(object.encryptedVotes) : false,
|
|
5381
|
+
uniqueValues: isSet(object.uniqueValues) ? globalThis.Boolean(object.uniqueValues) : false,
|
|
5382
|
+
costFromWeight: isSet(object.costFromWeight) ? globalThis.Boolean(object.costFromWeight) : false
|
|
5607
5383
|
};
|
|
5608
5384
|
},
|
|
5609
5385
|
toJSON(message) {
|
|
@@ -5707,11 +5483,11 @@ var ProcessMode = {
|
|
|
5707
5483
|
},
|
|
5708
5484
|
fromJSON(object) {
|
|
5709
5485
|
return {
|
|
5710
|
-
autoStart: isSet(object.autoStart) ? Boolean(object.autoStart) : false,
|
|
5711
|
-
interruptible: isSet(object.interruptible) ? Boolean(object.interruptible) : false,
|
|
5712
|
-
dynamicCensus: isSet(object.dynamicCensus) ? Boolean(object.dynamicCensus) : false,
|
|
5713
|
-
encryptedMetaData: isSet(object.encryptedMetaData) ? Boolean(object.encryptedMetaData) : false,
|
|
5714
|
-
preRegister: isSet(object.preRegister) ? Boolean(object.preRegister) : false
|
|
5486
|
+
autoStart: isSet(object.autoStart) ? globalThis.Boolean(object.autoStart) : false,
|
|
5487
|
+
interruptible: isSet(object.interruptible) ? globalThis.Boolean(object.interruptible) : false,
|
|
5488
|
+
dynamicCensus: isSet(object.dynamicCensus) ? globalThis.Boolean(object.dynamicCensus) : false,
|
|
5489
|
+
encryptedMetaData: isSet(object.encryptedMetaData) ? globalThis.Boolean(object.encryptedMetaData) : false,
|
|
5490
|
+
preRegister: isSet(object.preRegister) ? globalThis.Boolean(object.preRegister) : false
|
|
5715
5491
|
};
|
|
5716
5492
|
},
|
|
5717
5493
|
toJSON(message) {
|
|
@@ -5815,11 +5591,11 @@ var ProcessVoteOptions = {
|
|
|
5815
5591
|
},
|
|
5816
5592
|
fromJSON(object) {
|
|
5817
5593
|
return {
|
|
5818
|
-
maxCount: isSet(object.maxCount) ? Number(object.maxCount) : 0,
|
|
5819
|
-
maxValue: isSet(object.maxValue) ? Number(object.maxValue) : 0,
|
|
5820
|
-
maxVoteOverwrites: isSet(object.maxVoteOverwrites) ? Number(object.maxVoteOverwrites) : 0,
|
|
5821
|
-
maxTotalCost: isSet(object.maxTotalCost) ? Number(object.maxTotalCost) : 0,
|
|
5822
|
-
costExponent: isSet(object.costExponent) ? Number(object.costExponent) : 0
|
|
5594
|
+
maxCount: isSet(object.maxCount) ? globalThis.Number(object.maxCount) : 0,
|
|
5595
|
+
maxValue: isSet(object.maxValue) ? globalThis.Number(object.maxValue) : 0,
|
|
5596
|
+
maxVoteOverwrites: isSet(object.maxVoteOverwrites) ? globalThis.Number(object.maxVoteOverwrites) : 0,
|
|
5597
|
+
maxTotalCost: isSet(object.maxTotalCost) ? globalThis.Number(object.maxTotalCost) : 0,
|
|
5598
|
+
costExponent: isSet(object.costExponent) ? globalThis.Number(object.costExponent) : 0
|
|
5823
5599
|
};
|
|
5824
5600
|
},
|
|
5825
5601
|
toJSON(message) {
|
|
@@ -5886,7 +5662,9 @@ var OracleList = {
|
|
|
5886
5662
|
return message;
|
|
5887
5663
|
},
|
|
5888
5664
|
fromJSON(object) {
|
|
5889
|
-
return {
|
|
5665
|
+
return {
|
|
5666
|
+
oracles: globalThis.Array.isArray(object?.oracles) ? object.oracles.map((e) => bytesFromBase64(e)) : []
|
|
5667
|
+
};
|
|
5890
5668
|
},
|
|
5891
5669
|
toJSON(message) {
|
|
5892
5670
|
const obj = {};
|
|
@@ -5937,7 +5715,7 @@ var ValidatorList = {
|
|
|
5937
5715
|
},
|
|
5938
5716
|
fromJSON(object) {
|
|
5939
5717
|
return {
|
|
5940
|
-
validators: Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
|
|
5718
|
+
validators: globalThis.Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
|
|
5941
5719
|
};
|
|
5942
5720
|
},
|
|
5943
5721
|
toJSON(message) {
|
|
@@ -5957,7 +5735,18 @@ var ValidatorList = {
|
|
|
5957
5735
|
}
|
|
5958
5736
|
};
|
|
5959
5737
|
function createBaseValidator() {
|
|
5960
|
-
return {
|
|
5738
|
+
return {
|
|
5739
|
+
address: new Uint8Array(0),
|
|
5740
|
+
pubKey: new Uint8Array(0),
|
|
5741
|
+
power: 0,
|
|
5742
|
+
name: "",
|
|
5743
|
+
keyIndex: 0,
|
|
5744
|
+
height: 0,
|
|
5745
|
+
proposals: 0,
|
|
5746
|
+
votes: 0,
|
|
5747
|
+
validatorAddress: new Uint8Array(0),
|
|
5748
|
+
score: 0
|
|
5749
|
+
};
|
|
5961
5750
|
}
|
|
5962
5751
|
var Validator = {
|
|
5963
5752
|
encode(message, writer = import_minimal.default.Writer.create()) {
|
|
@@ -5976,6 +5765,21 @@ var Validator = {
|
|
|
5976
5765
|
if (message.keyIndex !== 0) {
|
|
5977
5766
|
writer.uint32(40).uint32(message.keyIndex);
|
|
5978
5767
|
}
|
|
5768
|
+
if (message.height !== 0) {
|
|
5769
|
+
writer.uint32(48).uint64(message.height);
|
|
5770
|
+
}
|
|
5771
|
+
if (message.proposals !== 0) {
|
|
5772
|
+
writer.uint32(56).uint64(message.proposals);
|
|
5773
|
+
}
|
|
5774
|
+
if (message.votes !== 0) {
|
|
5775
|
+
writer.uint32(64).uint64(message.votes);
|
|
5776
|
+
}
|
|
5777
|
+
if (message.validatorAddress.length !== 0) {
|
|
5778
|
+
writer.uint32(74).bytes(message.validatorAddress);
|
|
5779
|
+
}
|
|
5780
|
+
if (message.score !== 0) {
|
|
5781
|
+
writer.uint32(80).uint32(message.score);
|
|
5782
|
+
}
|
|
5979
5783
|
return writer;
|
|
5980
5784
|
},
|
|
5981
5785
|
decode(input, length) {
|
|
@@ -6015,6 +5819,36 @@ var Validator = {
|
|
|
6015
5819
|
}
|
|
6016
5820
|
message.keyIndex = reader.uint32();
|
|
6017
5821
|
continue;
|
|
5822
|
+
case 6:
|
|
5823
|
+
if (tag !== 48) {
|
|
5824
|
+
break;
|
|
5825
|
+
}
|
|
5826
|
+
message.height = longToNumber(reader.uint64());
|
|
5827
|
+
continue;
|
|
5828
|
+
case 7:
|
|
5829
|
+
if (tag !== 56) {
|
|
5830
|
+
break;
|
|
5831
|
+
}
|
|
5832
|
+
message.proposals = longToNumber(reader.uint64());
|
|
5833
|
+
continue;
|
|
5834
|
+
case 8:
|
|
5835
|
+
if (tag !== 64) {
|
|
5836
|
+
break;
|
|
5837
|
+
}
|
|
5838
|
+
message.votes = longToNumber(reader.uint64());
|
|
5839
|
+
continue;
|
|
5840
|
+
case 9:
|
|
5841
|
+
if (tag !== 74) {
|
|
5842
|
+
break;
|
|
5843
|
+
}
|
|
5844
|
+
message.validatorAddress = reader.bytes();
|
|
5845
|
+
continue;
|
|
5846
|
+
case 10:
|
|
5847
|
+
if (tag !== 80) {
|
|
5848
|
+
break;
|
|
5849
|
+
}
|
|
5850
|
+
message.score = reader.uint32();
|
|
5851
|
+
continue;
|
|
6018
5852
|
}
|
|
6019
5853
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6020
5854
|
break;
|
|
@@ -6027,9 +5861,14 @@ var Validator = {
|
|
|
6027
5861
|
return {
|
|
6028
5862
|
address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
|
|
6029
5863
|
pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(0),
|
|
6030
|
-
power: isSet(object.power) ? Number(object.power) : 0,
|
|
6031
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
6032
|
-
keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : 0
|
|
5864
|
+
power: isSet(object.power) ? globalThis.Number(object.power) : 0,
|
|
5865
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
5866
|
+
keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : 0,
|
|
5867
|
+
height: isSet(object.height) ? globalThis.Number(object.height) : 0,
|
|
5868
|
+
proposals: isSet(object.proposals) ? globalThis.Number(object.proposals) : 0,
|
|
5869
|
+
votes: isSet(object.votes) ? globalThis.Number(object.votes) : 0,
|
|
5870
|
+
validatorAddress: isSet(object.validatorAddress) ? bytesFromBase64(object.validatorAddress) : new Uint8Array(0),
|
|
5871
|
+
score: isSet(object.score) ? globalThis.Number(object.score) : 0
|
|
6033
5872
|
};
|
|
6034
5873
|
},
|
|
6035
5874
|
toJSON(message) {
|
|
@@ -6049,6 +5888,21 @@ var Validator = {
|
|
|
6049
5888
|
if (message.keyIndex !== 0) {
|
|
6050
5889
|
obj.keyIndex = Math.round(message.keyIndex);
|
|
6051
5890
|
}
|
|
5891
|
+
if (message.height !== 0) {
|
|
5892
|
+
obj.height = Math.round(message.height);
|
|
5893
|
+
}
|
|
5894
|
+
if (message.proposals !== 0) {
|
|
5895
|
+
obj.proposals = Math.round(message.proposals);
|
|
5896
|
+
}
|
|
5897
|
+
if (message.votes !== 0) {
|
|
5898
|
+
obj.votes = Math.round(message.votes);
|
|
5899
|
+
}
|
|
5900
|
+
if (message.validatorAddress.length !== 0) {
|
|
5901
|
+
obj.validatorAddress = base64FromBytes(message.validatorAddress);
|
|
5902
|
+
}
|
|
5903
|
+
if (message.score !== 0) {
|
|
5904
|
+
obj.score = Math.round(message.score);
|
|
5905
|
+
}
|
|
6052
5906
|
return obj;
|
|
6053
5907
|
},
|
|
6054
5908
|
create(base) {
|
|
@@ -6061,6 +5915,11 @@ var Validator = {
|
|
|
6061
5915
|
message.power = object.power ?? 0;
|
|
6062
5916
|
message.name = object.name ?? "";
|
|
6063
5917
|
message.keyIndex = object.keyIndex ?? 0;
|
|
5918
|
+
message.height = object.height ?? 0;
|
|
5919
|
+
message.proposals = object.proposals ?? 0;
|
|
5920
|
+
message.votes = object.votes ?? 0;
|
|
5921
|
+
message.validatorAddress = object.validatorAddress ?? new Uint8Array(0);
|
|
5922
|
+
message.score = object.score ?? 0;
|
|
6064
5923
|
return message;
|
|
6065
5924
|
}
|
|
6066
5925
|
};
|
|
@@ -6219,9 +6078,9 @@ var TendermintHeader = {
|
|
|
6219
6078
|
},
|
|
6220
6079
|
fromJSON(object) {
|
|
6221
6080
|
return {
|
|
6222
|
-
chainId: isSet(object.chainId) ? String(object.chainId) : "",
|
|
6223
|
-
height: isSet(object.height) ? Number(object.height) : 0,
|
|
6224
|
-
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
6081
|
+
chainId: isSet(object.chainId) ? globalThis.String(object.chainId) : "",
|
|
6082
|
+
height: isSet(object.height) ? globalThis.Number(object.height) : 0,
|
|
6083
|
+
timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
|
|
6225
6084
|
blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(0),
|
|
6226
6085
|
lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(0),
|
|
6227
6086
|
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
|
|
@@ -6330,7 +6189,9 @@ var ProcessResult = {
|
|
|
6330
6189
|
return message;
|
|
6331
6190
|
},
|
|
6332
6191
|
fromJSON(object) {
|
|
6333
|
-
return {
|
|
6192
|
+
return {
|
|
6193
|
+
votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : []
|
|
6194
|
+
};
|
|
6334
6195
|
},
|
|
6335
6196
|
toJSON(message) {
|
|
6336
6197
|
const obj = {};
|
|
@@ -6380,7 +6241,9 @@ var QuestionResult = {
|
|
|
6380
6241
|
return message;
|
|
6381
6242
|
},
|
|
6382
6243
|
fromJSON(object) {
|
|
6383
|
-
return {
|
|
6244
|
+
return {
|
|
6245
|
+
question: globalThis.Array.isArray(object?.question) ? object.question.map((e) => bytesFromBase64(e)) : []
|
|
6246
|
+
};
|
|
6384
6247
|
},
|
|
6385
6248
|
toJSON(message) {
|
|
6386
6249
|
const obj = {};
|
|
@@ -6431,7 +6294,7 @@ var ProcessEndingList = {
|
|
|
6431
6294
|
},
|
|
6432
6295
|
fromJSON(object) {
|
|
6433
6296
|
return {
|
|
6434
|
-
processList: Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
|
|
6297
|
+
processList: globalThis.Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
|
|
6435
6298
|
};
|
|
6436
6299
|
},
|
|
6437
6300
|
toJSON(message) {
|
|
@@ -6482,7 +6345,7 @@ var StoredKeys = {
|
|
|
6482
6345
|
return message;
|
|
6483
6346
|
},
|
|
6484
6347
|
fromJSON(object) {
|
|
6485
|
-
return { pids: Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
|
|
6348
|
+
return { pids: globalThis.Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
|
|
6486
6349
|
},
|
|
6487
6350
|
toJSON(message) {
|
|
6488
6351
|
const obj = {};
|
|
@@ -6500,26 +6363,11 @@ var StoredKeys = {
|
|
|
6500
6363
|
return message;
|
|
6501
6364
|
}
|
|
6502
6365
|
};
|
|
6503
|
-
var tsProtoGlobalThis = (() => {
|
|
6504
|
-
if (typeof globalThis !== "undefined") {
|
|
6505
|
-
return globalThis;
|
|
6506
|
-
}
|
|
6507
|
-
if (typeof self !== "undefined") {
|
|
6508
|
-
return self;
|
|
6509
|
-
}
|
|
6510
|
-
if (typeof window !== "undefined") {
|
|
6511
|
-
return window;
|
|
6512
|
-
}
|
|
6513
|
-
if (typeof global !== "undefined") {
|
|
6514
|
-
return global;
|
|
6515
|
-
}
|
|
6516
|
-
throw "Unable to locate global object";
|
|
6517
|
-
})();
|
|
6518
6366
|
function bytesFromBase64(b64) {
|
|
6519
|
-
if (
|
|
6520
|
-
return Uint8Array.from(
|
|
6367
|
+
if (globalThis.Buffer) {
|
|
6368
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
6521
6369
|
} else {
|
|
6522
|
-
const bin =
|
|
6370
|
+
const bin = globalThis.atob(b64);
|
|
6523
6371
|
const arr = new Uint8Array(bin.length);
|
|
6524
6372
|
for (let i = 0; i < bin.length; ++i) {
|
|
6525
6373
|
arr[i] = bin.charCodeAt(i);
|
|
@@ -6528,19 +6376,19 @@ function bytesFromBase64(b64) {
|
|
|
6528
6376
|
}
|
|
6529
6377
|
}
|
|
6530
6378
|
function base64FromBytes(arr) {
|
|
6531
|
-
if (
|
|
6532
|
-
return
|
|
6379
|
+
if (globalThis.Buffer) {
|
|
6380
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
6533
6381
|
} else {
|
|
6534
6382
|
const bin = [];
|
|
6535
6383
|
arr.forEach((byte) => {
|
|
6536
|
-
bin.push(String.fromCharCode(byte));
|
|
6384
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
6537
6385
|
});
|
|
6538
|
-
return
|
|
6386
|
+
return globalThis.btoa(bin.join(""));
|
|
6539
6387
|
}
|
|
6540
6388
|
}
|
|
6541
6389
|
function longToNumber(long) {
|
|
6542
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
6543
|
-
throw new
|
|
6390
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
6391
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
6544
6392
|
}
|
|
6545
6393
|
return long.toNumber();
|
|
6546
6394
|
}
|
|
@@ -6562,7 +6410,6 @@ export {
|
|
|
6562
6410
|
EnvelopeType,
|
|
6563
6411
|
FaucetPackage,
|
|
6564
6412
|
FaucetPayload,
|
|
6565
|
-
MintTokensTx,
|
|
6566
6413
|
NewProcessTx,
|
|
6567
6414
|
OracleList,
|
|
6568
6415
|
Process,
|
|
@@ -6579,8 +6426,6 @@ export {
|
|
|
6579
6426
|
ProofCA_Type,
|
|
6580
6427
|
ProofEthereumAccount,
|
|
6581
6428
|
ProofEthereumStorage,
|
|
6582
|
-
ProofGraviton,
|
|
6583
|
-
ProofIden3,
|
|
6584
6429
|
ProofMinime,
|
|
6585
6430
|
ProofZkSNARK,
|
|
6586
6431
|
QuestionResult,
|
|
@@ -6596,7 +6441,6 @@ export {
|
|
|
6596
6441
|
SourceNetworkId,
|
|
6597
6442
|
StoredKeys,
|
|
6598
6443
|
TendermintHeader,
|
|
6599
|
-
Treasurer,
|
|
6600
6444
|
Tx,
|
|
6601
6445
|
TxType,
|
|
6602
6446
|
Validator,
|