@vocdoni/proto 1.15.3 → 1.15.4

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.
@@ -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
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
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,7 @@ 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";
1447
1450
  TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
1448
1451
  return TxType2;
1449
1452
  })(TxType || {});
@@ -1491,15 +1494,9 @@ function txTypeFromJSON(object) {
1491
1494
  case 13:
1492
1495
  case "REGISTER_VOTER_KEY":
1493
1496
  return 13 /* REGISTER_VOTER_KEY */;
1494
- case 14:
1495
- case "MINT_TOKENS":
1496
- return 14 /* MINT_TOKENS */;
1497
1497
  case 15:
1498
1498
  case "SEND_TOKENS":
1499
1499
  return 15 /* SEND_TOKENS */;
1500
- case 16:
1501
- case "SET_TRANSACTION_COSTS":
1502
- return 16 /* SET_TRANSACTION_COSTS */;
1503
1500
  case 17:
1504
1501
  case "SET_ACCOUNT_INFO_URI":
1505
1502
  return 17 /* SET_ACCOUNT_INFO_URI */;
@@ -1530,6 +1527,9 @@ function txTypeFromJSON(object) {
1530
1527
  case 26:
1531
1528
  case "REGISTER_SIK":
1532
1529
  return 26 /* REGISTER_SIK */;
1530
+ case 27:
1531
+ case "SET_ACCOUNT_VALIDATOR":
1532
+ return 27 /* SET_ACCOUNT_VALIDATOR */;
1533
1533
  case -1:
1534
1534
  case "UNRECOGNIZED":
1535
1535
  default:
@@ -1566,12 +1566,8 @@ function txTypeToJSON(object) {
1566
1566
  return "SET_PROCESS_RESULTS";
1567
1567
  case 13 /* REGISTER_VOTER_KEY */:
1568
1568
  return "REGISTER_VOTER_KEY";
1569
- case 14 /* MINT_TOKENS */:
1570
- return "MINT_TOKENS";
1571
1569
  case 15 /* SEND_TOKENS */:
1572
1570
  return "SEND_TOKENS";
1573
- case 16 /* SET_TRANSACTION_COSTS */:
1574
- return "SET_TRANSACTION_COSTS";
1575
1571
  case 17 /* SET_ACCOUNT_INFO_URI */:
1576
1572
  return "SET_ACCOUNT_INFO_URI";
1577
1573
  case 18 /* ADD_DELEGATE_FOR_ACCOUNT */:
@@ -1592,6 +1588,8 @@ function txTypeToJSON(object) {
1592
1588
  return "DEL_ACCOUNT_SIK";
1593
1589
  case 26 /* REGISTER_SIK */:
1594
1590
  return "REGISTER_SIK";
1591
+ case 27 /* SET_ACCOUNT_VALIDATOR */:
1592
+ return "SET_ACCOUNT_VALIDATOR";
1595
1593
  case -1 /* UNRECOGNIZED */:
1596
1594
  default:
1597
1595
  return "UNRECOGNIZED";
@@ -1841,8 +1839,6 @@ var Census_Type = /* @__PURE__ */ ((Census_Type2) => {
1841
1839
  Census_Type2[Census_Type2["ETHEREUMSTORAGE"] = 3] = "ETHEREUMSTORAGE";
1842
1840
  Census_Type2[Census_Type2["ETHEREUMACCOUNT"] = 4] = "ETHEREUMACCOUNT";
1843
1841
  Census_Type2[Census_Type2["CA"] = 5] = "CA";
1844
- Census_Type2[Census_Type2["GRAVITON"] = 1001] = "GRAVITON";
1845
- Census_Type2[Census_Type2["IDEN3"] = 1002] = "IDEN3";
1846
1842
  Census_Type2[Census_Type2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
1847
1843
  return Census_Type2;
1848
1844
  })(Census_Type || {});
@@ -1866,12 +1862,6 @@ function census_TypeFromJSON(object) {
1866
1862
  case 5:
1867
1863
  case "CA":
1868
1864
  return 5 /* CA */;
1869
- case 1001:
1870
- case "GRAVITON":
1871
- return 1001 /* GRAVITON */;
1872
- case 1002:
1873
- case "IDEN3":
1874
- return 1002 /* IDEN3 */;
1875
1865
  case -1:
1876
1866
  case "UNRECOGNIZED":
1877
1867
  default:
@@ -1892,10 +1882,6 @@ function census_TypeToJSON(object) {
1892
1882
  return "ETHEREUMACCOUNT";
1893
1883
  case 5 /* CA */:
1894
1884
  return "CA";
1895
- case 1001 /* GRAVITON */:
1896
- return "GRAVITON";
1897
- case 1002 /* IDEN3 */:
1898
- return "IDEN3";
1899
1885
  case -1 /* UNRECOGNIZED */:
1900
1886
  default:
1901
1887
  return "UNRECOGNIZED";
@@ -2111,7 +2097,7 @@ var VoteEnvelope = {
2111
2097
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
2112
2098
  votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(0),
2113
2099
  nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(0),
2114
- encryptionKeyIndexes: Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => Number(e)) : []
2100
+ encryptionKeyIndexes: globalThis.Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => globalThis.Number(e)) : []
2115
2101
  };
2116
2102
  },
2117
2103
  toJSON(message) {
@@ -2193,12 +2179,6 @@ function createBaseProof() {
2193
2179
  var Proof = {
2194
2180
  encode(message, writer = import_minimal.default.Writer.create()) {
2195
2181
  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
2182
  case "ethereumStorage":
2203
2183
  ProofEthereumStorage.encode(message.payload.ethereumStorage, writer.uint32(26).fork()).ldelim();
2204
2184
  break;
@@ -2227,18 +2207,6 @@ var Proof = {
2227
2207
  while (reader.pos < end) {
2228
2208
  const tag = reader.uint32();
2229
2209
  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
2210
  case 3:
2243
2211
  if (tag !== 26) {
2244
2212
  break;
@@ -2291,17 +2259,11 @@ var Proof = {
2291
2259
  },
2292
2260
  fromJSON(object) {
2293
2261
  return {
2294
- payload: isSet(object.graviton) ? { $case: "graviton", graviton: ProofGraviton.fromJSON(object.graviton) } : isSet(object.iden3) ? { $case: "iden3", iden3: ProofIden3.fromJSON(object.iden3) } : 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
2262
+ 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
2263
  };
2296
2264
  },
2297
2265
  toJSON(message) {
2298
2266
  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
2267
  if (message.payload?.$case === "ethereumStorage") {
2306
2268
  obj.ethereumStorage = ProofEthereumStorage.toJSON(message.payload.ethereumStorage);
2307
2269
  }
@@ -2327,12 +2289,6 @@ var Proof = {
2327
2289
  },
2328
2290
  fromPartial(object) {
2329
2291
  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
2292
  if (object.payload?.$case === "ethereumStorage" && object.payload?.ethereumStorage !== void 0 && object.payload?.ethereumStorage !== null) {
2337
2293
  message.payload = {
2338
2294
  $case: "ethereumStorage",
@@ -2363,106 +2319,6 @@ var Proof = {
2363
2319
  return message;
2364
2320
  }
2365
2321
  };
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
2322
  function createBaseProofEthereumStorage() {
2467
2323
  return { key: new Uint8Array(0), value: new Uint8Array(0), siblings: [] };
2468
2324
  }
@@ -2516,7 +2372,7 @@ var ProofEthereumStorage = {
2516
2372
  return {
2517
2373
  key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
2518
2374
  value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
2519
- siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2375
+ siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2520
2376
  };
2521
2377
  },
2522
2378
  toJSON(message) {
@@ -2622,7 +2478,7 @@ var ProofEthereumAccount = {
2622
2478
  balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(0),
2623
2479
  storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(0),
2624
2480
  codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
2625
- siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2481
+ siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2626
2482
  };
2627
2483
  },
2628
2484
  toJSON(message) {
@@ -3052,11 +2908,11 @@ var ProofZkSNARK = {
3052
2908
  },
3053
2909
  fromJSON(object) {
3054
2910
  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)) : []
2911
+ circuitParametersIndex: isSet(object.circuitParametersIndex) ? globalThis.Number(object.circuitParametersIndex) : 0,
2912
+ a: globalThis.Array.isArray(object?.a) ? object.a.map((e) => globalThis.String(e)) : [],
2913
+ b: globalThis.Array.isArray(object?.b) ? object.b.map((e) => globalThis.String(e)) : [],
2914
+ c: globalThis.Array.isArray(object?.c) ? object.c.map((e) => globalThis.String(e)) : [],
2915
+ publicInputs: globalThis.Array.isArray(object?.publicInputs) ? object.publicInputs.map((e) => globalThis.String(e)) : []
3060
2916
  };
3061
2917
  },
3062
2918
  toJSON(message) {
@@ -3160,11 +3016,11 @@ var Account = {
3160
3016
  },
3161
3017
  fromJSON(object) {
3162
3018
  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
3019
+ balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
3020
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3021
+ infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : "",
3022
+ delegateAddrs: globalThis.Array.isArray(object?.delegateAddrs) ? object.delegateAddrs.map((e) => bytesFromBase64(e)) : [],
3023
+ processIndex: isSet(object.processIndex) ? globalThis.Number(object.processIndex) : 0
3168
3024
  };
3169
3025
  },
3170
3026
  toJSON(message) {
@@ -3199,72 +3055,6 @@ var Account = {
3199
3055
  return message;
3200
3056
  }
3201
3057
  };
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
3058
  function createBaseTx() {
3269
3059
  return { payload: void 0 };
3270
3060
  }
@@ -3286,9 +3076,6 @@ var Tx = {
3286
3076
  case "registerKey":
3287
3077
  RegisterKeyTx.encode(message.payload.registerKey, writer.uint32(42).fork()).ldelim();
3288
3078
  break;
3289
- case "mintTokens":
3290
- MintTokensTx.encode(message.payload.mintTokens, writer.uint32(50).fork()).ldelim();
3291
- break;
3292
3079
  case "sendTokens":
3293
3080
  SendTokensTx.encode(message.payload.sendTokens, writer.uint32(58).fork()).ldelim();
3294
3081
  break;
@@ -3353,12 +3140,6 @@ var Tx = {
3353
3140
  }
3354
3141
  message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.decode(reader, reader.uint32()) };
3355
3142
  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
3143
  case 7:
3363
3144
  if (tag !== 58) {
3364
3145
  break;
@@ -3420,7 +3201,7 @@ var Tx = {
3420
3201
  },
3421
3202
  fromJSON(object) {
3422
3203
  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.mintTokens) ? { $case: "mintTokens", mintTokens: MintTokensTx.fromJSON(object.mintTokens) } : isSet(object.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet(object.setTransactionCosts) ? {
3204
+ 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
3205
  $case: "setTransactionCosts",
3425
3206
  setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
3426
3207
  } : 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 +3224,6 @@ var Tx = {
3443
3224
  if (message.payload?.$case === "registerKey") {
3444
3225
  obj.registerKey = RegisterKeyTx.toJSON(message.payload.registerKey);
3445
3226
  }
3446
- if (message.payload?.$case === "mintTokens") {
3447
- obj.mintTokens = MintTokensTx.toJSON(message.payload.mintTokens);
3448
- }
3449
3227
  if (message.payload?.$case === "sendTokens") {
3450
3228
  obj.sendTokens = SendTokensTx.toJSON(message.payload.sendTokens);
3451
3229
  }
@@ -3492,9 +3270,6 @@ var Tx = {
3492
3270
  if (object.payload?.$case === "registerKey" && object.payload?.registerKey !== void 0 && object.payload?.registerKey !== null) {
3493
3271
  message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.fromPartial(object.payload.registerKey) };
3494
3272
  }
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
3273
  if (object.payload?.$case === "sendTokens" && object.payload?.sendTokens !== void 0 && object.payload?.sendTokens !== null) {
3499
3274
  message.payload = { $case: "sendTokens", sendTokens: SendTokensTx.fromPartial(object.payload.sendTokens) };
3500
3275
  }
@@ -3649,7 +3424,7 @@ var NewProcessTx = {
3649
3424
  fromJSON(object) {
3650
3425
  return {
3651
3426
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
3652
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3427
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3653
3428
  process: isSet(object.process) ? Process.fromJSON(object.process) : void 0
3654
3429
  };
3655
3430
  },
@@ -3803,15 +3578,15 @@ var SetProcessTx = {
3803
3578
  fromJSON(object) {
3804
3579
  return {
3805
3580
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
3806
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3581
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3807
3582
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
3808
3583
  status: isSet(object.status) ? processStatusFromJSON(object.status) : void 0,
3809
- questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
3584
+ questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
3810
3585
  censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : void 0,
3811
- censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
3586
+ censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
3812
3587
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
3813
3588
  results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
3814
- tempSIKs: isSet(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
3589
+ tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0
3815
3590
  };
3816
3591
  },
3817
3592
  toJSON(message) {
@@ -3986,10 +3761,10 @@ var AdminTx = {
3986
3761
  address: isSet(object.address) ? bytesFromBase64(object.address) : void 0,
3987
3762
  encryptionPrivateKey: isSet(object.encryptionPrivateKey) ? bytesFromBase64(object.encryptionPrivateKey) : void 0,
3988
3763
  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,
3764
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
3765
+ power: isSet(object.power) ? globalThis.Number(object.power) : void 0,
3991
3766
  publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
3992
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0
3767
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
3993
3768
  };
3994
3769
  },
3995
3770
  toJSON(message) {
@@ -4109,11 +3884,11 @@ var RegisterKeyTx = {
4109
3884
  },
4110
3885
  fromJSON(object) {
4111
3886
  return {
4112
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3887
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4113
3888
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
4114
3889
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
4115
3890
  newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(0),
4116
- weight: isSet(object.weight) ? String(object.weight) : ""
3891
+ weight: isSet(object.weight) ? globalThis.String(object.weight) : ""
4117
3892
  };
4118
3893
  },
4119
3894
  toJSON(message) {
@@ -4148,100 +3923,6 @@ var RegisterKeyTx = {
4148
3923
  return message;
4149
3924
  }
4150
3925
  };
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
3926
  function createBaseSendTokensTx() {
4246
3927
  return { txtype: 0, nonce: 0, from: new Uint8Array(0), to: new Uint8Array(0), value: 0 };
4247
3928
  }
@@ -4312,10 +3993,10 @@ var SendTokensTx = {
4312
3993
  fromJSON(object) {
4313
3994
  return {
4314
3995
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4315
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3996
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4316
3997
  from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(0),
4317
3998
  to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
4318
- value: isSet(object.value) ? Number(object.value) : 0
3999
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0
4319
4000
  };
4320
4001
  },
4321
4002
  toJSON(message) {
@@ -4402,8 +4083,8 @@ var SetTransactionCostsTx = {
4402
4083
  fromJSON(object) {
4403
4084
  return {
4404
4085
  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
4086
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4087
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0
4407
4088
  };
4408
4089
  },
4409
4090
  toJSON(message) {
@@ -4438,7 +4119,9 @@ function createBaseSetAccountTx() {
4438
4119
  account: void 0,
4439
4120
  faucetPackage: void 0,
4440
4121
  delegates: [],
4441
- SIK: void 0
4122
+ SIK: void 0,
4123
+ publicKey: void 0,
4124
+ name: void 0
4442
4125
  };
4443
4126
  }
4444
4127
  var SetAccountTx = {
@@ -4464,6 +4147,12 @@ var SetAccountTx = {
4464
4147
  if (message.SIK !== void 0) {
4465
4148
  writer.uint32(58).bytes(message.SIK);
4466
4149
  }
4150
+ if (message.publicKey !== void 0) {
4151
+ writer.uint32(66).bytes(message.publicKey);
4152
+ }
4153
+ if (message.name !== void 0) {
4154
+ writer.uint32(74).string(message.name);
4155
+ }
4467
4156
  return writer;
4468
4157
  },
4469
4158
  decode(input, length) {
@@ -4515,6 +4204,18 @@ var SetAccountTx = {
4515
4204
  }
4516
4205
  message.SIK = reader.bytes();
4517
4206
  continue;
4207
+ case 8:
4208
+ if (tag !== 66) {
4209
+ break;
4210
+ }
4211
+ message.publicKey = reader.bytes();
4212
+ continue;
4213
+ case 9:
4214
+ if (tag !== 74) {
4215
+ break;
4216
+ }
4217
+ message.name = reader.string();
4218
+ continue;
4518
4219
  }
4519
4220
  if ((tag & 7) === 4 || tag === 0) {
4520
4221
  break;
@@ -4526,12 +4227,14 @@ var SetAccountTx = {
4526
4227
  fromJSON(object) {
4527
4228
  return {
4528
4229
  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,
4230
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
4231
+ infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : void 0,
4531
4232
  account: isSet(object.account) ? bytesFromBase64(object.account) : void 0,
4532
4233
  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
4234
+ delegates: globalThis.Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
4235
+ SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0,
4236
+ publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
4237
+ name: isSet(object.name) ? globalThis.String(object.name) : void 0
4535
4238
  };
4536
4239
  },
4537
4240
  toJSON(message) {
@@ -4557,6 +4260,12 @@ var SetAccountTx = {
4557
4260
  if (message.SIK !== void 0) {
4558
4261
  obj.SIK = base64FromBytes(message.SIK);
4559
4262
  }
4263
+ if (message.publicKey !== void 0) {
4264
+ obj.publicKey = base64FromBytes(message.publicKey);
4265
+ }
4266
+ if (message.name !== void 0) {
4267
+ obj.name = message.name;
4268
+ }
4560
4269
  return obj;
4561
4270
  },
4562
4271
  create(base) {
@@ -4571,17 +4280,22 @@ var SetAccountTx = {
4571
4280
  message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
4572
4281
  message.delegates = object.delegates?.map((e) => e) || [];
4573
4282
  message.SIK = object.SIK ?? void 0;
4283
+ message.publicKey = object.publicKey ?? void 0;
4284
+ message.name = object.name ?? void 0;
4574
4285
  return message;
4575
4286
  }
4576
4287
  };
4577
4288
  function createBaseSIKTx() {
4578
- return { txtype: 0, SIK: void 0 };
4289
+ return { txtype: 0, nonce: void 0, SIK: void 0 };
4579
4290
  }
4580
4291
  var SIKTx = {
4581
4292
  encode(message, writer = import_minimal.default.Writer.create()) {
4582
4293
  if (message.txtype !== 0) {
4583
4294
  writer.uint32(8).int32(message.txtype);
4584
4295
  }
4296
+ if (message.nonce !== void 0) {
4297
+ writer.uint32(16).uint32(message.nonce);
4298
+ }
4585
4299
  if (message.SIK !== void 0) {
4586
4300
  writer.uint32(26).bytes(message.SIK);
4587
4301
  }
@@ -4600,6 +4314,12 @@ var SIKTx = {
4600
4314
  }
4601
4315
  message.txtype = reader.int32();
4602
4316
  continue;
4317
+ case 2:
4318
+ if (tag !== 16) {
4319
+ break;
4320
+ }
4321
+ message.nonce = reader.uint32();
4322
+ continue;
4603
4323
  case 3:
4604
4324
  if (tag !== 26) {
4605
4325
  break;
@@ -4617,6 +4337,7 @@ var SIKTx = {
4617
4337
  fromJSON(object) {
4618
4338
  return {
4619
4339
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4340
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
4620
4341
  SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0
4621
4342
  };
4622
4343
  },
@@ -4625,6 +4346,9 @@ var SIKTx = {
4625
4346
  if (message.txtype !== 0) {
4626
4347
  obj.txtype = txTypeToJSON(message.txtype);
4627
4348
  }
4349
+ if (message.nonce !== void 0) {
4350
+ obj.nonce = Math.round(message.nonce);
4351
+ }
4628
4352
  if (message.SIK !== void 0) {
4629
4353
  obj.SIK = base64FromBytes(message.SIK);
4630
4354
  }
@@ -4636,6 +4360,7 @@ var SIKTx = {
4636
4360
  fromPartial(object) {
4637
4361
  const message = createBaseSIKTx();
4638
4362
  message.txtype = object.txtype ?? 0;
4363
+ message.nonce = object.nonce ?? void 0;
4639
4364
  message.SIK = object.SIK ?? void 0;
4640
4365
  return message;
4641
4366
  }
@@ -4773,7 +4498,7 @@ var CollectFaucetTx = {
4773
4498
  return {
4774
4499
  txType: isSet(object.txType) ? txTypeFromJSON(object.txType) : 0,
4775
4500
  faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
4776
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0
4501
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
4777
4502
  };
4778
4503
  },
4779
4504
  toJSON(message) {
@@ -4851,9 +4576,9 @@ var FaucetPayload = {
4851
4576
  },
4852
4577
  fromJSON(object) {
4853
4578
  return {
4854
- identifier: isSet(object.identifier) ? Number(object.identifier) : 0,
4579
+ identifier: isSet(object.identifier) ? globalThis.Number(object.identifier) : 0,
4855
4580
  to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
4856
- amount: isSet(object.amount) ? Number(object.amount) : 0
4581
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0
4857
4582
  };
4858
4583
  },
4859
4584
  toJSON(message) {
@@ -4998,7 +4723,7 @@ var SetKeykeeperTx = {
4998
4723
  fromJSON(object) {
4999
4724
  return {
5000
4725
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
5001
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
4726
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
5002
4727
  keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array(0)
5003
4728
  };
5004
4729
  },
@@ -5363,35 +5088,35 @@ var Process = {
5363
5088
  return {
5364
5089
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
5365
5090
  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,
5091
+ startBlock: isSet(object.startBlock) ? globalThis.Number(object.startBlock) : 0,
5092
+ blockCount: isSet(object.blockCount) ? globalThis.Number(object.blockCount) : 0,
5368
5093
  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,
5094
+ censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
5095
+ encryptionPrivateKeys: globalThis.Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => globalThis.String(e)) : [],
5096
+ encryptionPublicKeys: globalThis.Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => globalThis.String(e)) : [],
5097
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
5373
5098
  status: isSet(object.status) ? processStatusFromJSON(object.status) : 0,
5374
5099
  paramsSignature: isSet(object.paramsSignature) ? bytesFromBase64(object.paramsSignature) : void 0,
5375
- namespace: isSet(object.namespace) ? Number(object.namespace) : 0,
5100
+ namespace: isSet(object.namespace) ? globalThis.Number(object.namespace) : 0,
5376
5101
  envelopeType: isSet(object.envelopeType) ? EnvelopeType.fromJSON(object.envelopeType) : void 0,
5377
5102
  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,
5103
+ questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
5104
+ questionCount: isSet(object.questionCount) ? globalThis.Number(object.questionCount) : void 0,
5380
5105
  voteOptions: isSet(object.voteOptions) ? ProcessVoteOptions.fromJSON(object.voteOptions) : void 0,
5381
5106
  censusOrigin: isSet(object.censusOrigin) ? censusOriginFromJSON(object.censusOrigin) : 0,
5382
5107
  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,
5108
+ ethIndexSlot: isSet(object.ethIndexSlot) ? globalThis.Number(object.ethIndexSlot) : void 0,
5109
+ sourceBlockHeight: isSet(object.sourceBlockHeight) ? globalThis.Number(object.sourceBlockHeight) : void 0,
5385
5110
  owner: isSet(object.owner) ? bytesFromBase64(object.owner) : void 0,
5386
- metadata: isSet(object.metadata) ? String(object.metadata) : void 0,
5111
+ metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : void 0,
5387
5112
  sourceNetworkId: isSet(object.sourceNetworkId) ? sourceNetworkIdFromJSON(object.sourceNetworkId) : 0,
5388
- maxCensusSize: isSet(object.maxCensusSize) ? Number(object.maxCensusSize) : 0,
5113
+ maxCensusSize: isSet(object.maxCensusSize) ? globalThis.Number(object.maxCensusSize) : 0,
5389
5114
  rollingCensusRoot: isSet(object.rollingCensusRoot) ? bytesFromBase64(object.rollingCensusRoot) : void 0,
5390
- rollingCensusSize: isSet(object.rollingCensusSize) ? Number(object.rollingCensusSize) : void 0,
5115
+ rollingCensusSize: isSet(object.rollingCensusSize) ? globalThis.Number(object.rollingCensusSize) : void 0,
5391
5116
  nullifiersRoot: isSet(object.nullifiersRoot) ? bytesFromBase64(object.nullifiersRoot) : void 0,
5392
5117
  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
5118
+ tokenDecimals: isSet(object.tokenDecimals) ? globalThis.Number(object.tokenDecimals) : void 0,
5119
+ tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0
5395
5120
  };
5396
5121
  },
5397
5122
  toJSON(message) {
@@ -5599,11 +5324,11 @@ var EnvelopeType = {
5599
5324
  },
5600
5325
  fromJSON(object) {
5601
5326
  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
5327
+ serial: isSet(object.serial) ? globalThis.Boolean(object.serial) : false,
5328
+ anonymous: isSet(object.anonymous) ? globalThis.Boolean(object.anonymous) : false,
5329
+ encryptedVotes: isSet(object.encryptedVotes) ? globalThis.Boolean(object.encryptedVotes) : false,
5330
+ uniqueValues: isSet(object.uniqueValues) ? globalThis.Boolean(object.uniqueValues) : false,
5331
+ costFromWeight: isSet(object.costFromWeight) ? globalThis.Boolean(object.costFromWeight) : false
5607
5332
  };
5608
5333
  },
5609
5334
  toJSON(message) {
@@ -5707,11 +5432,11 @@ var ProcessMode = {
5707
5432
  },
5708
5433
  fromJSON(object) {
5709
5434
  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
5435
+ autoStart: isSet(object.autoStart) ? globalThis.Boolean(object.autoStart) : false,
5436
+ interruptible: isSet(object.interruptible) ? globalThis.Boolean(object.interruptible) : false,
5437
+ dynamicCensus: isSet(object.dynamicCensus) ? globalThis.Boolean(object.dynamicCensus) : false,
5438
+ encryptedMetaData: isSet(object.encryptedMetaData) ? globalThis.Boolean(object.encryptedMetaData) : false,
5439
+ preRegister: isSet(object.preRegister) ? globalThis.Boolean(object.preRegister) : false
5715
5440
  };
5716
5441
  },
5717
5442
  toJSON(message) {
@@ -5815,11 +5540,11 @@ var ProcessVoteOptions = {
5815
5540
  },
5816
5541
  fromJSON(object) {
5817
5542
  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
5543
+ maxCount: isSet(object.maxCount) ? globalThis.Number(object.maxCount) : 0,
5544
+ maxValue: isSet(object.maxValue) ? globalThis.Number(object.maxValue) : 0,
5545
+ maxVoteOverwrites: isSet(object.maxVoteOverwrites) ? globalThis.Number(object.maxVoteOverwrites) : 0,
5546
+ maxTotalCost: isSet(object.maxTotalCost) ? globalThis.Number(object.maxTotalCost) : 0,
5547
+ costExponent: isSet(object.costExponent) ? globalThis.Number(object.costExponent) : 0
5823
5548
  };
5824
5549
  },
5825
5550
  toJSON(message) {
@@ -5886,7 +5611,9 @@ var OracleList = {
5886
5611
  return message;
5887
5612
  },
5888
5613
  fromJSON(object) {
5889
- return { oracles: Array.isArray(object?.oracles) ? object.oracles.map((e) => bytesFromBase64(e)) : [] };
5614
+ return {
5615
+ oracles: globalThis.Array.isArray(object?.oracles) ? object.oracles.map((e) => bytesFromBase64(e)) : []
5616
+ };
5890
5617
  },
5891
5618
  toJSON(message) {
5892
5619
  const obj = {};
@@ -5937,7 +5664,7 @@ var ValidatorList = {
5937
5664
  },
5938
5665
  fromJSON(object) {
5939
5666
  return {
5940
- validators: Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
5667
+ validators: globalThis.Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
5941
5668
  };
5942
5669
  },
5943
5670
  toJSON(message) {
@@ -5957,7 +5684,18 @@ var ValidatorList = {
5957
5684
  }
5958
5685
  };
5959
5686
  function createBaseValidator() {
5960
- return { address: new Uint8Array(0), pubKey: new Uint8Array(0), power: 0, name: "", keyIndex: 0 };
5687
+ return {
5688
+ address: new Uint8Array(0),
5689
+ pubKey: new Uint8Array(0),
5690
+ power: 0,
5691
+ name: "",
5692
+ keyIndex: 0,
5693
+ height: 0,
5694
+ proposals: 0,
5695
+ votes: 0,
5696
+ validatorAddress: new Uint8Array(0),
5697
+ score: 0
5698
+ };
5961
5699
  }
5962
5700
  var Validator = {
5963
5701
  encode(message, writer = import_minimal.default.Writer.create()) {
@@ -5976,6 +5714,21 @@ var Validator = {
5976
5714
  if (message.keyIndex !== 0) {
5977
5715
  writer.uint32(40).uint32(message.keyIndex);
5978
5716
  }
5717
+ if (message.height !== 0) {
5718
+ writer.uint32(48).uint64(message.height);
5719
+ }
5720
+ if (message.proposals !== 0) {
5721
+ writer.uint32(56).uint64(message.proposals);
5722
+ }
5723
+ if (message.votes !== 0) {
5724
+ writer.uint32(64).uint64(message.votes);
5725
+ }
5726
+ if (message.validatorAddress.length !== 0) {
5727
+ writer.uint32(74).bytes(message.validatorAddress);
5728
+ }
5729
+ if (message.score !== 0) {
5730
+ writer.uint32(80).uint32(message.score);
5731
+ }
5979
5732
  return writer;
5980
5733
  },
5981
5734
  decode(input, length) {
@@ -6015,6 +5768,36 @@ var Validator = {
6015
5768
  }
6016
5769
  message.keyIndex = reader.uint32();
6017
5770
  continue;
5771
+ case 6:
5772
+ if (tag !== 48) {
5773
+ break;
5774
+ }
5775
+ message.height = longToNumber(reader.uint64());
5776
+ continue;
5777
+ case 7:
5778
+ if (tag !== 56) {
5779
+ break;
5780
+ }
5781
+ message.proposals = longToNumber(reader.uint64());
5782
+ continue;
5783
+ case 8:
5784
+ if (tag !== 64) {
5785
+ break;
5786
+ }
5787
+ message.votes = longToNumber(reader.uint64());
5788
+ continue;
5789
+ case 9:
5790
+ if (tag !== 74) {
5791
+ break;
5792
+ }
5793
+ message.validatorAddress = reader.bytes();
5794
+ continue;
5795
+ case 10:
5796
+ if (tag !== 80) {
5797
+ break;
5798
+ }
5799
+ message.score = reader.uint32();
5800
+ continue;
6018
5801
  }
6019
5802
  if ((tag & 7) === 4 || tag === 0) {
6020
5803
  break;
@@ -6027,9 +5810,14 @@ var Validator = {
6027
5810
  return {
6028
5811
  address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
6029
5812
  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
5813
+ power: isSet(object.power) ? globalThis.Number(object.power) : 0,
5814
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
5815
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : 0,
5816
+ height: isSet(object.height) ? globalThis.Number(object.height) : 0,
5817
+ proposals: isSet(object.proposals) ? globalThis.Number(object.proposals) : 0,
5818
+ votes: isSet(object.votes) ? globalThis.Number(object.votes) : 0,
5819
+ validatorAddress: isSet(object.validatorAddress) ? bytesFromBase64(object.validatorAddress) : new Uint8Array(0),
5820
+ score: isSet(object.score) ? globalThis.Number(object.score) : 0
6033
5821
  };
6034
5822
  },
6035
5823
  toJSON(message) {
@@ -6049,6 +5837,21 @@ var Validator = {
6049
5837
  if (message.keyIndex !== 0) {
6050
5838
  obj.keyIndex = Math.round(message.keyIndex);
6051
5839
  }
5840
+ if (message.height !== 0) {
5841
+ obj.height = Math.round(message.height);
5842
+ }
5843
+ if (message.proposals !== 0) {
5844
+ obj.proposals = Math.round(message.proposals);
5845
+ }
5846
+ if (message.votes !== 0) {
5847
+ obj.votes = Math.round(message.votes);
5848
+ }
5849
+ if (message.validatorAddress.length !== 0) {
5850
+ obj.validatorAddress = base64FromBytes(message.validatorAddress);
5851
+ }
5852
+ if (message.score !== 0) {
5853
+ obj.score = Math.round(message.score);
5854
+ }
6052
5855
  return obj;
6053
5856
  },
6054
5857
  create(base) {
@@ -6061,6 +5864,11 @@ var Validator = {
6061
5864
  message.power = object.power ?? 0;
6062
5865
  message.name = object.name ?? "";
6063
5866
  message.keyIndex = object.keyIndex ?? 0;
5867
+ message.height = object.height ?? 0;
5868
+ message.proposals = object.proposals ?? 0;
5869
+ message.votes = object.votes ?? 0;
5870
+ message.validatorAddress = object.validatorAddress ?? new Uint8Array(0);
5871
+ message.score = object.score ?? 0;
6064
5872
  return message;
6065
5873
  }
6066
5874
  };
@@ -6219,9 +6027,9 @@ var TendermintHeader = {
6219
6027
  },
6220
6028
  fromJSON(object) {
6221
6029
  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,
6030
+ chainId: isSet(object.chainId) ? globalThis.String(object.chainId) : "",
6031
+ height: isSet(object.height) ? globalThis.Number(object.height) : 0,
6032
+ timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
6225
6033
  blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(0),
6226
6034
  lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(0),
6227
6035
  dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
@@ -6330,7 +6138,9 @@ var ProcessResult = {
6330
6138
  return message;
6331
6139
  },
6332
6140
  fromJSON(object) {
6333
- return { votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [] };
6141
+ return {
6142
+ votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : []
6143
+ };
6334
6144
  },
6335
6145
  toJSON(message) {
6336
6146
  const obj = {};
@@ -6380,7 +6190,9 @@ var QuestionResult = {
6380
6190
  return message;
6381
6191
  },
6382
6192
  fromJSON(object) {
6383
- return { question: Array.isArray(object?.question) ? object.question.map((e) => bytesFromBase64(e)) : [] };
6193
+ return {
6194
+ question: globalThis.Array.isArray(object?.question) ? object.question.map((e) => bytesFromBase64(e)) : []
6195
+ };
6384
6196
  },
6385
6197
  toJSON(message) {
6386
6198
  const obj = {};
@@ -6431,7 +6243,7 @@ var ProcessEndingList = {
6431
6243
  },
6432
6244
  fromJSON(object) {
6433
6245
  return {
6434
- processList: Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
6246
+ processList: globalThis.Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
6435
6247
  };
6436
6248
  },
6437
6249
  toJSON(message) {
@@ -6482,7 +6294,7 @@ var StoredKeys = {
6482
6294
  return message;
6483
6295
  },
6484
6296
  fromJSON(object) {
6485
- return { pids: Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
6297
+ return { pids: globalThis.Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
6486
6298
  },
6487
6299
  toJSON(message) {
6488
6300
  const obj = {};
@@ -6500,26 +6312,11 @@ var StoredKeys = {
6500
6312
  return message;
6501
6313
  }
6502
6314
  };
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
6315
  function bytesFromBase64(b64) {
6519
- if (tsProtoGlobalThis.Buffer) {
6520
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
6316
+ if (globalThis.Buffer) {
6317
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
6521
6318
  } else {
6522
- const bin = tsProtoGlobalThis.atob(b64);
6319
+ const bin = globalThis.atob(b64);
6523
6320
  const arr = new Uint8Array(bin.length);
6524
6321
  for (let i = 0; i < bin.length; ++i) {
6525
6322
  arr[i] = bin.charCodeAt(i);
@@ -6528,19 +6325,19 @@ function bytesFromBase64(b64) {
6528
6325
  }
6529
6326
  }
6530
6327
  function base64FromBytes(arr) {
6531
- if (tsProtoGlobalThis.Buffer) {
6532
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
6328
+ if (globalThis.Buffer) {
6329
+ return globalThis.Buffer.from(arr).toString("base64");
6533
6330
  } else {
6534
6331
  const bin = [];
6535
6332
  arr.forEach((byte) => {
6536
- bin.push(String.fromCharCode(byte));
6333
+ bin.push(globalThis.String.fromCharCode(byte));
6537
6334
  });
6538
- return tsProtoGlobalThis.btoa(bin.join(""));
6335
+ return globalThis.btoa(bin.join(""));
6539
6336
  }
6540
6337
  }
6541
6338
  function longToNumber(long) {
6542
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
6543
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
6339
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
6340
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
6544
6341
  }
6545
6342
  return long.toNumber();
6546
6343
  }
@@ -6562,7 +6359,6 @@ export {
6562
6359
  EnvelopeType,
6563
6360
  FaucetPackage,
6564
6361
  FaucetPayload,
6565
- MintTokensTx,
6566
6362
  NewProcessTx,
6567
6363
  OracleList,
6568
6364
  Process,
@@ -6579,8 +6375,6 @@ export {
6579
6375
  ProofCA_Type,
6580
6376
  ProofEthereumAccount,
6581
6377
  ProofEthereumStorage,
6582
- ProofGraviton,
6583
- ProofIden3,
6584
6378
  ProofMinime,
6585
6379
  ProofZkSNARK,
6586
6380
  QuestionResult,
@@ -6596,7 +6390,6 @@ export {
6596
6390
  SourceNetworkId,
6597
6391
  StoredKeys,
6598
6392
  TendermintHeader,
6599
- Treasurer,
6600
6393
  Tx,
6601
6394
  TxType,
6602
6395
  Validator,